1 /* Copyright (C) 2001 Free Software Foundation, Inc. */ 2 3 /* { dg-do preprocess } */ 4 5 /* Source: Neil Booth, 23 Sep 2001. 6 7 A tricky, pathological corner case we used to get wrong. Expansion 8 should go as follows. The asterisk indicates the token has "blue 9 paint" can no longer be macro expanded. We used to lose that 10 information when parsing arguments and dropping to the lexer to get 11 the ')'. 12 13 foo ) 14 bar foo* ) 15 func (foo* ) 16 foo* 17 18 If we try and expand the final foo, we get an "unterminated 19 argument list invoking macro <func>" error. If we do the right 20 thing and leave it as is, no diagnostics are emitted. */ 21 22 #define func(x) x 23 #define bar func( 24 #define foo bar foo 25 foo ) 26