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/9764: Varargs macro extension incorrectly expands if the varargs argument is the macro itself


Synopsis: Varargs macro extension incorrectly expands if the varargs argument is the macro itself

State-Changed-From-To: open->closed
State-Changed-By: neil
State-Changed-When: Wed Feb 19 23:48:50 2003
State-Changed-Why:
    3.1 and later give the following, which is correct.  I've not checked 3.0, but I expect it's similar.
    
    $ cat /tmp/bar.c
    #define func(a, varargs...) _func(a, ##b)
    
    func(a, func(a, b));
    $ gcc -E /tmp/bar.c
    # 1 "/tmp/bar.c"
    # 1 "<built-in>"
    # 1 "<command line>"
    # 1 "/tmp/bar.c"
    
    
    /tmp/bar.c:3:19: pasting "," and "b" does not give a valid preprocessing token
    _func(a,b);

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9764


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