diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/c11-stdarg-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/c11-stdarg-1.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/c11-stdarg-1.c b/gcc/testsuite/gcc.dg/c11-stdarg-1.c new file mode 100644 index 0000000..984577f --- /dev/null +++ b/gcc/testsuite/gcc.dg/c11-stdarg-1.c @@ -0,0 +1,7 @@ +/* Test variadic functions with no named parameters not supported in C11. */ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -pedantic-errors" } */ + +int f (...); /* { dg-error "ISO C requires a named argument before" } */ +int g (int (...)); /* { dg-error "ISO C requires a named argument before" } */ +int h (...) { return 0; } /* { dg-error "ISO C requires a named argument before" } */ |