Commit aff2a12b by Richard Kenner

(parmlist_2): Give error for function with only ELLIPSIS as an

argument.

From-SVN: r7969
parent dc5627bf
...@@ -2062,8 +2062,13 @@ parmlist_2: /* empty */ ...@@ -2062,8 +2062,13 @@ parmlist_2: /* empty */
{ $$ = get_parm_info (0); } { $$ = get_parm_info (0); }
| ELLIPSIS | ELLIPSIS
{ $$ = get_parm_info (0); { $$ = get_parm_info (0);
if (pedantic) /* Gcc used to allow this as an extension. However, it does
pedwarn ("ANSI C requires a named argument before `...'"); 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 | parms
{ $$ = get_parm_info (1); } { $$ = get_parm_info (1); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment