This is the mail archive of the
mailing list for the GCC project.
preprocessor/6779: -O option causes preprocessing problems
- From: avd at openlinksw dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 23 May 2002 09:14:19 -0000
- Subject: preprocessor/6779: -O option causes preprocessing problems
- Reply-to: avd at openlinksw dot com
>Synopsis: -O option causes preprocessing problems
>Arrival-Date: Thu May 23 02:16:01 PDT 2002
Linux on x86, glibc 2.2.2
My problem is akin of one mentioned among "Frequently Reported Bugs" but is slightly different. gcc-3.1 successfully
compiles my code when optimization is turned off but fails
when it is on. It produces the following error messages:
m.c:9:1: directives may not be used inside a macro argument
m.c:8:6: unterminated argument list invoking macro "printf"
Note that my macro does not have arguments at all.
Perhaps printf is also a macro. But if it works without
optimization why it fails with it?
Compile the attached program with and without optimization
and compare the results:
gcc -O m.c