[Bug c/82134] warn_unused_result triggers on empty structs even when they are used
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 7 15:53:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82134
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The problem with `if (0) { /* don't warn about stuff in here */ }` is that you
can jump into that block from elsewhere:
if (0)
{
L:
// ...
}
so it's not as easy as it might seem.
More information about the Gcc-bugs
mailing list