Am 10.01.2011 21:26, schrieb Stefan Fritsch:
BTW, gcc has -Wdeclaration-after-statement to catch these things.
Should we add that to the default warnings enabled in maintainer mode?
+2 - NetWare compiler cant deal with either;
and +1 to treat it even as error rather than warning:
-Werror=declarationafterstatement

BTW. isnt the option without dashes? My 'man gcc' lists:
Wdeclarationafterstatement (C and ObjectiveC only)
     Warn when a declaration is found after a statement in a block.
     This construct, known from C++, was introduced with ISO C99
     and is by default allowed in GCC.  It is not supported by ISO C90
     and was not supported by GCC versions before GCC 3.0.

Since GCC < 3 didnt support this I assume that then also the above options are not recognized - so adding them should depend on GCC version >= 3.

Gün.


Reply via email to