aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>1998-03-12 14:49:30 +0000
committerJim Wilson <wilson@gcc.gnu.org>1998-03-12 06:49:30 -0800
commit7a50f1264914cd1ea81dda059b828a552e00c2fd (patch)
tree86c9d9c0b74c1fb404cb10326cd1551936255217 /gcc
parent57dbca5e34c7455a47aa4d0a54a10ea26b5ddb8b (diff)
downloadgcc-7a50f1264914cd1ea81dda059b828a552e00c2fd.zip
gcc-7a50f1264914cd1ea81dda059b828a552e00c2fd.tar.gz
gcc-7a50f1264914cd1ea81dda059b828a552e00c2fd.tar.bz2
Don't accept GNU C macro varargs extension when pedantic.
* cccp.c (create_definition): If pedantic, call pedwarn for macro varargs feature. From-SVN: r18522
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/cccp.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f339a1e..1d1bcb76 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/cccp.c b/gcc/cccp.c
index 6ee1568..a989bbe 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -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;