[Bug c/52050] Want an option to warn about a declaration inside a for/while/if statements.
mans at mansr dot com
gcc-bugzilla@gcc.gnu.org
Mon Jan 30 07:23:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52050
--- Comment #4 from Mans Rullgard <mans at mansr dot com> 2012-01-30 00:45:05 UTC ---
I'm not here to argue semantics. I use -Wdeclaration-after-statement to avoid
accidentally introducing code that will fail with compilers that do not support
this. Having an equivalent for the for loop construct would have saved me some
time today. If all compilers supported C99 fully, there would be no need for
any of this, but sadly this is not the case.
More information about the Gcc-bugs
mailing list