aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gnu23-stdarg-1.c
blob: 0a78b2214987dd79ce5cd0689c42cfb0cfcc3ebe (plain)
1
2
3
4
5
6
7
8
/* Test variadic functions with no named parameters do not accept GNU
   attributes before '...'.  */
/* { dg-do compile } */
/* { dg-options "-std=gnu23" } */

int f (__attribute__(()) ...); /* { dg-error "expected" } */
int g (int (__attribute__(()) ...)); /* { dg-error "expected" } */
int h (__attribute__(()) ...) { return 0; } /* { dg-error "expected" } */