OSDN Git Service

* cpphash.c (collect_formal_parameters): Do not complain about
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Mar 2000 18:46:09 +0000 (18:46 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Mar 2000 18:46:09 +0000 (18:46 +0000)
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

gcc/ChangeLog
gcc/cpphash.c

index ca7070e..8c0b1af 100644 (file)
@@ -1,3 +1,8 @@
+2000-03-15  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
+
+       * cpphash.c (collect_formal_parameters): Do not complain about
+       parameter names that just start with `__VA_ARGS__'.
+
 Wed Mar 15 13:26:58 MET 2000  Jan Hubicka  <jh@suse.cz>
 
        * i386.md (movhi_1): Promote movw imm, reg to movl imm, reg and
index 8d0b570..7fe58d9 100644 (file)
@@ -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);