aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c2x-unproto-3.c
blob: 762f8b21034cc725978e20595e63133db09a2ee4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* Test that declaring a function with () is the same as (void) in C2X.  Valid
   use cases.  */
/* { dg-do compile } */
/* { dg-options "-std=c2x -pedantic-errors -Wstrict-prototypes" } */

void f1 ();
void f1 (void);

void f2 (void);
void f2 ();

typedef void T1 ();
typedef void T1 (void);

void f3 ();

_Static_assert (_Generic (f3,
			  void (*) (int) : 1,
			  void (*) (void) : 2,
			  default : 3) == 2);