+2003-10-01 Kelley Cook <kelleycook@wideopenwest.com>
+
+ PR C/12466
+ * c-parse.in (parmlist_2): Mark declaration with an ellipsis as ISO C.
+
2003-10-01 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config/mips/xm-iris5.h: Remove, unnecessary.
tries to verify that BUILT_IN_NEXT_ARG is being used
correctly. */
error ("ISO C requires a named argument before `...'");
+ parsing_iso_function_signature = true;
}
| parms
{ $$ = get_parm_info (1);
parsing_iso_function_signature = true;
}
| parms ',' ELLIPSIS
- { $$ = get_parm_info (0); }
+ { $$ = get_parm_info (0);
+ parsing_iso_function_signature = true;
+ }
;
parms:
+2003-10-01 Kelley Cook <kelleycook@wideopenwest.com>
+
+ * gcc.dg/Wold-style-definition-2.c: New testcase.
+ * gcc.dg/wtr-func-def-1.c: Modify to reflect new warning.
+
2003-09-29 Richard Henderson <rth@redhat.com>
* g++.dg/init/array10.C: Add dg-options.
--- /dev/null
+/* PR c/12466
+ Test for not warning about ellipsises with -Wold-style-definition. */
+
+/* Origin: Kelley Cook <kcook@gcc.gnu.org> */
+/* { dg-do compile } */
+/* { dg-options "-Wold-style-definition" } */
+
+void bar1 ( ... ) {} /* { dg-error "ISO C requires a named argument" } */
+
+void bar2 (int a, ... ) {}
return 0;
}
-/* Test that we don't warn about stdarg functions. */
+/* Test stdarg functions. */
f_stdarg1(const char *s, ...)
-{
+{ /* { dg-warning "traditional C rejects ISO C style" } */
return 0;
}
void f_stdarg2(const char *s, ...)
-{
+{ /* { dg-warning "traditional C rejects ISO C style" } */
return;
}
extern void f_stdarg3(const char *, ...);
void f_stdarg3(const char *s, ...)
-{
+{ /* { dg-warning "traditional C rejects ISO C style" } */
return;
}