Don't accept GNU C macro varargs extension when pedantic.
authorJim Wilson <wilson@cygnus.com>
Thu, 12 Mar 1998 14:49:30 +0000 (14:49 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 12 Mar 1998 14:49:30 +0000 (06:49 -0800)
* cccp.c (create_definition): If pedantic, call pedwarn for macro
varargs feature.

From-SVN: r18522

gcc/ChangeLog
gcc/cccp.c

index f339a1eb02f2f7b2a811aef271ec1237125408d5..1d1bcb76837e833f2ef6e4c45e81f04b80961a1b 100644 (file)
@@ -1,3 +1,8 @@
+Thu Mar 12 14:47:14 1998  Jim Wilson  <wilson@cygnus.com>
+
+       * cccp.c (create_definition): If pedantic, call pedwarn for macro
+       varargs feature.
+
 Thu Mar 12 13:43:25 1998  Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE>
 
        * i386.c (ix86_logical_operator): New function.
index 6ee15682a143f88d7b5e354439a9ecc02046adb7..a989bbe814e2bb2bed258543f436810d19ae471a 100644 (file)
@@ -5565,6 +5565,8 @@ create_definition (buf, limit, op)
        /* do we have a "special" rest-args extension here? */
        if (limit - bp > REST_EXTENSION_LENGTH
            && bcmp (rest_extension, bp, REST_EXTENSION_LENGTH) == 0) {
+         if (pedantic && !instack[indepth].system_header_p)
+           pedwarn ("ANSI C does not allow macro with variable arguments");
          rest_args = 1;
          temp->rest_args = 1;
          break;