This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
preprocessor/2941: gcc/preprocessor bug
- To: gcc-gnats at gcc dot gnu dot org, debian-gcc at lists dot debian dot org
- Subject: preprocessor/2941: gcc/preprocessor bug
- From: Rolf Schaeuble <mail at rschaeuble dot de>
- Date: Fri, 25 May 2001 16:03:05 +0200
>Number: 2941
>Category: preprocessor
>Synopsis: gcc doens't use cpp properly ?!?
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 25 07:06:03 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Rolf Schaeuble
>Release: 3.0 20010426 (Debian prerelease) (Debian testing/unstable)
>Organization:
>Environment:
System: Linux c-l-003 2.4.4 #2 Fre Mai 11 17:04:56 CEST 2001 i686 unknown
Architecture: i686
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:
gcc's using of the preprocessor seems to be bugggy.
See example code below.
>How-To-Repeat:
Here's a small sample code:
---
#define CPACK1 #pragma pack(1)
CPACK1
int main()
{
}
---
This gives a error message (syntax error at '#' token).
If I specify '-save-temps' on commandline, it works.
If I preprocess this file, save the result, and then call g++ with it, it works too (without -save-temps).
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: