aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-08-24 17:45:11 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-08-24 17:45:11 -0400
commitaff2a12b7029cbbe67612a4d2ce9edfe7bb150fe (patch)
treea3572c994bb35504fa8f79f3854263bc2d2ab88a
parentdc5627bf6ac58adb9f1ec1e42813f40338fa7ec8 (diff)
downloadgcc-aff2a12b7029cbbe67612a4d2ce9edfe7bb150fe.zip
gcc-aff2a12b7029cbbe67612a4d2ce9edfe7bb150fe.tar.gz
gcc-aff2a12b7029cbbe67612a4d2ce9edfe7bb150fe.tar.bz2
(parmlist_2): Give error for function with only ELLIPSIS as an
argument. From-SVN: r7969
-rw-r--r--gcc/c-parse.in9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index bf3183b..fc1bab6 100644
--- a/gcc/c-parse.in
+++ b/gcc/c-parse.in
@@ -2062,8 +2062,13 @@ parmlist_2: /* empty */
{ $$ = get_parm_info (0); }
| ELLIPSIS
{ $$ = get_parm_info (0);
- if (pedantic)
- pedwarn ("ANSI C requires a named argument before `...'");
+ /* Gcc used to allow this as an extension. However, it does
+ not work for all targets, and thus has been disabled.
+ Also, since func (...) and func () are indistinguishable,
+ it caused problems with the code in expand_builtin which
+ tries to verify that BUILT_IN_NEXT_ARG is being used
+ correctly. */
+ error ("ANSI C requires a named argument before `...'");
}
| parms
{ $$ = get_parm_info (1); }