From 57ba19ba6721d4aeefb39d21aa006982a18937eb Mon Sep 17 00:00:00 2001 From: neil Date: Sat, 8 Jul 2000 02:18:25 +0000 Subject: * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34919 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cpplib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/cpplib.h') diff --git a/gcc/cpplib.h b/gcc/cpplib.h index 1c516a67312..e9bb24f8ee0 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -158,7 +158,6 @@ struct cpp_name #define STRINGIFY_ARG (1 << 3) /* If macro argument to be stringified. */ #define PASTE_LEFT (1 << 4) /* If on LHS of a ## operator. */ #define PASTED (1 << 5) /* The result of a ## operator. */ -#define GNU_VARARGS (1 << 6) /* GNU ## kludge. */ /* A preprocessing token. This has been carefully packed and should occupy 16 bytes on 32-bit hosts and 24 bytes on 64-bit hosts. */ @@ -181,7 +180,8 @@ struct cpp_token /* cpp_toklist flags. */ #define LIST_OFFSET (1 << 0) #define VAR_ARGS (1 << 1) -#define BEG_OF_FILE (1 << 2) +#define GNU_REST_ARGS (1 << 2) /* Set in addition to VAR_ARGS. */ +#define BEG_OF_FILE (1 << 3) struct directive; /* These are deliberately incomplete. */ struct answer; -- cgit v1.2.1