aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpphash.c
diff options
context:
space:
mode:
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 8d0b570..7fe58d9 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);