https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107310
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is similar to C:
void bar (int *x);
__attribute__((noreturn)) void baz (void);
int
foo (void)
{
int a __attribute__((cleanup (bar)));
if (1)
baz ();
}
on which we were at -O0 warning already in 4.7, haven't tried older compilers.
In C we optimizing the if (0) and if (1) conditions at genericization time,
only in C++ we were and now we no longer do.