This is the mail archive of the 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]
Other format: [Raw text]

preprocessor/6779: -O option causes preprocessing problems

>Number:         6779
>Category:       preprocessor
>Synopsis:       -O option causes preprocessing problems
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 23 02:16:01 PDT 2002
>Release:        gcc-3.1
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

gcc m.c


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