public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: preprocessor/6779: -O option causes preprocessing problems
@ 2002-05-23 2:50 neil
0 siblings, 0 replies; 2+ messages in thread
From: neil @ 2002-05-23 2:50 UTC (permalink / raw)
To: avd, gcc-bugs, gcc-prs, nobody
Synopsis: -O option causes preprocessing problems
State-Changed-From-To: open->closed
State-Changed-By: neil
State-Changed-When: Thu May 23 02:50:36 2002
State-Changed-Why:
This is the same as the frequently reported non-bug.
Glibc defines printf as a macro if optimization is on.
At the top of your file, put #undef printf to solve this.
GCC 3.2 allows you to put directives in macro arguments,
so this Gblic issue disappears, but the changes will
not be backported to 3.1 .
Why was the message reported by the compiler unclear to
you? I'm worried as I don't think I can make it any clearer.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6779
^ permalink raw reply [flat|nested] 2+ messages in thread
* preprocessor/6779: -O option causes preprocessing problems
@ 2002-05-23 2:16 avd
0 siblings, 0 replies; 2+ messages in thread
From: avd @ 2002-05-23 2:16 UTC (permalink / raw)
To: gcc-gnats
>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
>Closed-Date:
>Last-Modified:
>Originator: avd@openlinksw.com
>Release: gcc-3.1
>Organization:
>Environment:
Linux on x86, glibc 2.2.2
>Description:
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?
>How-To-Repeat:
Compile the attached program with and without optimization
and compare the results:
gcc -O m.c
gcc m.c
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-05-23 9:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-23 2:50 preprocessor/6779: -O option causes preprocessing problems neil
-- strict thread matches above, loose matches on Subject: below --
2002-05-23 2:16 avd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).