code inside "#if 0" generates warnings with -pedantic
>Submitter-Id: net-debian
>Originator: Markus F.X.J. Oberhumer <markus@oberhumer.com>
>Organization: none
>Confidential: no
>Synopsis: code inside "#if 0" generates warnings with -pedantic
>Severity: serious
>Priority: medium
>Category: preprocessor
>Class: rejects-legal
>Release: 3.0 20010426 (Debian prerelease) (Debian testing/unstable)
>Environment:
System: Linux laetitia 2.4.3 #1 Wed Apr 4 03:58:32 CEST 2001 i586 unknown
Architecture: i586
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,proto,objc --prefix=/usr
--infodir=/share/info --mandir=
/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib
--enable-long-long --enable-nls --without-x --without
-included-gettext --disable-checking --enable-threads=posix
--enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc
i386-linux
>Description:
code inside "#if 0" generates warnings with -pedantic
>How-To-Repeat:
$ gcc-3.0 -c -O2 -Werror -pedantic bug01.c
bug01.c:10:1: C++ style comments are not allowed in ISO C89
bug01.c:10:1: (this will be reported only once per input file)
$ cat bug01.c
/* Markus F.X.J. Oberhumer <markus@oberhumer.com>
* gcc 3.0 20010426 (Debian prerelease) bug report:
*
* code inside "#if 0" generates warnings with -pedantic
*/
int foo = 0;
#if 0
// int bar = 1;
#endif
>Fix:
Reply to: