This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

preprocessor/2941: gcc/preprocessor bug



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]