cpphash.c (is__va_args__): New function.
authorNeil Booth <neilb@earthling.net>
Sat, 8 Jul 2000 02:18:25 +0000 (02:18 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sat, 8 Jul 2000 02:18:25 +0000 (02:18 +0000)
commit563dd08adfa12573fdecf9669fdf685fef5fd360
tree9ca49cb51958d754a1e1218f2ee16625c7cb8dc6
parent0828a0bd1b6f503880c694f106c8424967cb38aa
cpphash.c (is__va_args__): New function.

* cpphash.c (is__va_args__): New function.
(count_params): Fix line reported in error messages.  Use
is__va_args__.  Don't return ')' on error.  Flag GNU style
rest args macro definitions.
(parse_define): Check macro name is not __VA_ARGS__.
(save_expansion): Check identifier in non-varargs-macro is
not __VA_ARGS__.  Don't flag GNU_VARARGS.
* cpplex.c (parse_args): Accept no argument iff GNU_REST_ARGS.
(maybe_paste_with_next): Use per-macro GNU_REST_ARGS rather
 than per-token GNU_VARARGS.
* cpplib.h (GNU_VARARGS): Remove.
(GNU_REST_ARGS): New.

* gcc.dg/cpp/macsyntx.c: New tests.

From-SVN: r34919
gcc/ChangeLog
gcc/cpphash.c
gcc/cpplex.c
gcc/cpplib.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/macsyntx.c [new file with mode: 0644]