On Thu, May 26, 2016 at 3:06 AM, Marek Polacek <pola...@redhat.com> wrote: > On Wed, May 25, 2016 at 03:21:00PM -0600, Martin Sebor wrote: >> I see. Thanks for clarifying that. No warning on a declaration >> alone makes sense in the case above but it has the unfortunate >> effect of suppressing the warning when the declaration is followed >> by a statement, such as in: >> >> void f (int*, int); >> >> void g (int i) >> { >> switch (i) { >> int a [3]; >> memset (a, 0, sizeof a); >> >> default: >> f (a, 3); >> } >> } > > Ah, then I think we should probably look into GIMPLE_TRY, using > gimple_try_eval, too.
It might also make sense to distinguish between gimple_try_kind of GIMPLE_TRY_CATCH (a user-written try block) and GIMPLE_TRY_FINALLY (a compiler-generated cleanup). Jason