diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-03-09 17:49:26 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-03-09 17:49:26 +0000 |
commit | 8051b17802cf05b70177ae9a370940ba677f1add (patch) | |
tree | edbb4bc15e1240f47d8004e4a9bdcb43c90f0acf /gcc/cpphash.c | |
parent | 37c5269a9f449dcba7506876258aa75548c5766b (diff) | |
download | gcc-8051b17802cf05b70177ae9a370940ba677f1add.zip gcc-8051b17802cf05b70177ae9a370940ba677f1add.tar.gz gcc-8051b17802cf05b70177ae9a370940ba677f1add.tar.bz2 |
cpphash.c (collect_formal_parameters): strncmp returns 0 for match.
* cpphash.c (collect_formal_parameters): strncmp returns 0 for
match. (cpp_compare_defs): Count the nul separator when
advancing over argument names.
From-SVN: r32448
Diffstat (limited to 'gcc/cpphash.c')
-rw-r--r-- | gcc/cpphash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cpphash.c b/gcc/cpphash.c index fc4051b..51c5de0 100644 --- a/gcc/cpphash.c +++ b/gcc/cpphash.c @@ -588,7 +588,7 @@ collect_formal_parameters (pfile) continue; } if (CPP_PEDANTIC (pfile) && CPP_OPTIONS (pfile)->c99 - && strncmp (tok, "__VA_ARGS__", sizeof "__VA_ARGS__" - 1)) + && !strncmp (tok, "__VA_ARGS__", sizeof "__VA_ARGS__" - 1)) cpp_pedwarn (pfile, "C99 does not permit use of `__VA_ARGS__' as a macro argument name"); namebuf = xrealloc (namebuf, argslen + len + 1); @@ -1495,7 +1495,7 @@ _cpp_compare_defs (pfile, d1, d2) int i = d1->nargs; while (i--) { - len = strlen (arg1); + len = strlen (arg1) + 1; if (strcmp (arg1, arg2)) return 1; arg1 += len; |