Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / c2x-old-style-definition-6.c
blob72bfd56f00a320d7791113c8c896c66bcf44ed4b
1 /* Test old-style function definitions not in C2x: () gives a type with
2 a prototype for all declarations. */
3 /* { dg-do compile } */
4 /* { dg-options "-std=c2x" } */
6 void f1 (); /* { dg-message "declared here" } */
8 /* Prototyped function returning a pointer to a function with no arguments. */
9 void (*f2 (void))() { return f1; }
11 void
12 g (void)
14 f1 (1); /* { dg-error "too many arguments" } */
15 f2 () (1); /* { dg-error "too many arguments" } */