OSDN Git Service

(parmlist_2): Give error for function with only ELLIPSIS as an
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Aug 1994 21:45:11 +0000 (21:45 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Aug 1994 21:45:11 +0000 (21:45 +0000)
argument.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7969 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-parse.in

index bf3183b..fc1bab6 100644 (file)
@@ -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); }