This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

Re: preprocessor/5513: considers non-nested macro as nested one


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


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