This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: preprocessor/5513: considers non-nested macro as nested one
- From: neil at gcc dot gnu dot org
- To: alexandervpetrov at hotmail dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 28 Jan 2002 13:49:48 -0000
- Subject: Re: preprocessor/5513: considers non-nested macro as nested one
- Reply-to: neil at gcc dot gnu dot org, alexandervpetrov at hotmail dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: considers non-nested macro as nested one
State-Changed-From-To: open->closed
State-Changed-By: neil
State-Changed-When: Mon Jan 28 05:49:45 2002
State-Changed-Why:
This is not a bug either. I suggest you try
www.comeaucomputing.com/tryitout
with the -E option for independent verification before
posting any more examples. What software uses macros
like this anyway?
For PR/5498, the macro A has completely finished expanding
and its expansion has been left (in order to get the ')')
at the time that A comes up for re-expansion. Hence it expands again.
In this example (which is 5498 with an extra parenthesis)
the original B is *still under expansion* when macro A
is invoked, and so the token B in A's expansion
is never considered for expansion, because that would
be a nested expansion of B. The opening parenthesis
at the end of A is not even looked at when this
decision to not expand B is made; B is still at
the bottom of the macro stack. See the difference?
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5513