public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: preprocessor/5498: indirect self-reference is not recognized
@ 2002-01-26 9:57 neil
0 siblings, 0 replies; 2+ messages in thread
From: neil @ 2002-01-26 9:57 UTC (permalink / raw)
To: alexandervpetrov, gcc-bugs, gcc-prs, nobody
Synopsis: indirect self-reference is not recognized
State-Changed-From-To: open->closed
State-Changed-By: neil
State-Changed-When: Sat Jan 26 09:57:27 2002
State-Changed-Why:
This is not a bug; the expansion of macro A has terminated
by the time you get to the ')', and therefore the second
invocation of A is not nested, and A is re-expanded.
The EDG front end does the same as GCC too; see
http://www.comeaucomputing.com/tryitout/
with the -E option.
If you have a compiler that behaves differently, that
compiler is buggy.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5498
^ permalink raw reply [flat|nested] 2+ messages in thread
* preprocessor/5498: indirect self-reference is not recognized
@ 2002-01-26 9:26 alexandervpetrov
0 siblings, 0 replies; 2+ messages in thread
From: alexandervpetrov @ 2002-01-26 9:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 5498
>Category: preprocessor
>Synopsis: indirect self-reference is not recognized
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 26 09:26:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Alexander Petrov
>Release: gcc version 2.95.1 19990816 (release)
>Organization:
>Environment:
SunOS dionysus 5.7 Generic_106541-02 sun4u sparc SUNW,Ultra-5_10
>Description:
Macro A refers to B, macro B refers to A;
single A is expanded twice in the following code:
# define A A_EXP B(
# define B() B_EXP A
A )
result:
A_EXP B_EXP A_EXP B(
>How-To-Repeat:
# define A A_EXP B(
# define B() B_EXP A
A )
>Fix:
explicit specification of object-like macro rescan needed
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-01-26 17:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-26 9:57 preprocessor/5498: indirect self-reference is not recognized neil
-- strict thread matches above, loose matches on Subject: below --
2002-01-26 9:26 alexandervpetrov
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).