This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/29276] New: C preprocessor run on Objective C code
- From: "roberthensing at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Sep 2006 22:10:19 -0000
- Subject: [Bug preprocessor/29276] New: C preprocessor run on Objective C code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Everytime I try to compile the libFoundation sources the preprocessor complains
with error messages like these:
NSObject.m:382:1: error: pasting "(" and "[" does not give a valid
preprocessing token
NSObject.m:513:1: error: pasting "(" and "[" does not give a valid
preprocessing token
I had to preprocess the source with the -x objective-c flags, forcing cpp to
process the file in Objective C mode and it worked fine.
I would have attached the preprocessed file, if there would have been an option
to make the preprocessor only include files and not expand macros but I
couldn't find it in your documentation. I might have overlooked it.
Sources can be found here:
http://prdownloads.sourceforge.net/libfoundation/libFoundation-0.9.0.tar.gz?download
GCC was invoked like this:
gcc -fPIC -fgnu-runtime -I.. -g -O2 -fobjc-exceptions -Wall -DDEBUG -c
NSObject.m -o shared_obj/NSObject.o
Adding the -x objective-c flags to the gcc command line did not work.
--
Summary: C preprocessor run on Objective C code
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: roberthensing at hotmail dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29276