summaryrefslogtreecommitdiff
path: root/gcc/cpphash.c
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-03-15 18:46:09 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-03-15 18:46:09 +0000
commit5b1c68af0421c7b15e2ce4fe6b68283063da229a (patch)
treeb373d3996e1502203a16ca74cd83e30588fc6e8d /gcc/cpphash.c
parent989c1f38244eeaac6345c5121e99b9b7da10cdc7 (diff)
downloadgcc-5b1c68af0421c7b15e2ce4fe6b68283063da229a.tar.gz
* cpphash.c (collect_formal_parameters): Do not complain about
parameter names that just start with `__VA_ARGS__'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32563 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.c')
-rw-r--r--gcc/cpphash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cpphash.c b/gcc/cpphash.c
index 8d0b570bb01..7fe58d98516 100644
--- a/gcc/cpphash.c
+++ b/gcc/cpphash.c
@@ -599,7 +599,8 @@ collect_formal_parameters (pfile)
continue;
}
if (CPP_PEDANTIC (pfile) && CPP_OPTIONS (pfile)->c99
- && !strncmp (tok, "__VA_ARGS__", sizeof "__VA_ARGS__" - 1))
+ && len == sizeof "__VA_ARGS__" - 1
+ && !strncmp (tok, "__VA_ARGS__", len))
cpp_pedwarn (pfile,
"C99 does not permit use of `__VA_ARGS__' as a macro argument name");
namebuf = (U_CHAR *) xrealloc (namebuf, argslen + len + 1);