diff options
author | Jim Wilson <wilson@cygnus.com> | 1998-03-12 14:49:30 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1998-03-12 06:49:30 -0800 |
commit | 7a50f1264914cd1ea81dda059b828a552e00c2fd (patch) | |
tree | 86c9d9c0b74c1fb404cb10326cd1551936255217 /gcc/cccp.c | |
parent | 57dbca5e34c7455a47aa4d0a54a10ea26b5ddb8b (diff) | |
download | gcc-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/cccp.c')
-rw-r--r-- | gcc/cccp.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |