This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
preprocessor/2881: code inside "#if 0" generates warnings with -pedantic
- To: gcc-gnats at gcc dot gnu dot org, debian-gcc at lists dot debian dot org
- Subject: preprocessor/2881: code inside "#if 0" generates warnings with -pedantic
- From: "Markus F.X.J. Oberhumer" <markus at oberhumer dot com>
- Date: Sun, 20 May 2001 20:34:53 +0200 (CEST)
- Reply-To: markus at oberhumer dot com
>Number: 2881
>Category: preprocessor
>Synopsis: code inside "#if 0" generates warnings with -pedantic
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Sun May 20 11:36:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Markus F.X.J. Oberhumer <markus@oberhumer.com>
>Release: 3.0 20010426 (Debian prerelease) (Debian testing/unstable)
>Organization:
none
>Environment:
System: Linux laetitia 2.4.3 #1 Wed Apr 4 03:58:32 CEST 2001 i586 unknown
Architecture: i586
=20
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: ../src/configure -v
--enable-languages=3Dc,c++,java,f77,proto,objc --prefix=3D/usr
--infodir=3D/share/info --mandir=3D
/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=3Dposix
--enable-java-gc=3Dboehm --with-cpp-install-dir=3Dbin --enable-objc-gc=20
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 =3D 0;
#if 0
// int bar =3D 1;
#endif
>Fix:
=20
>Release-Note:
>Audit-Trail:
>Unformatted: