I no longer think this is possible. See the Comment in this (3,0,0 - pretty old already) GCC source c-parse.in :
/* This is what appears inside the parens in a function declarator. Is value is represented in the format that grokdeclarator expects. */ parmlist_2: /* empty */ { $$ = get_parm_info (0); } | ELLIPSIS { $$ = get_parm_info (0); /* 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 ("ISO C requires a named argument before `...'");
GCC 2.95.3 has the same comment.
Newer versions of GCC (4.6.1) also do not have the ability to accept this code (from gcc / c-parse.c):
static struct c_arg_info * c_parser_parms_list_declarator (c_parser *parser, tree attrs) { ... if (c_parser_next_token_is (parser, CPP_ELLIPSIS)) { struct c_arg_info *ret = build_arg_info (); ret->types = error_mark_node; error_at (c_parser_peek_token (parser)->location, "ISO C requires a named argument before %<...%>"); c_parser_consume_token (parser);
source share