modula2: M2MetaError.{def,mod} and P2SymBuild.mod further cleanup
[official-gcc.git] / gcc / testsuite / gcc.dg / c23-generic-4.c
blobf9f65615dd989f72d40415562260717a3c046d99
1 /* Test C2Y _Generic features: no warning or error with -std=c23 by
2 default. */
3 /* { dg-do compile } */
4 /* { dg-options "-std=c23" } */
6 _Static_assert (_Generic (const int, int : 1, const int : 2) == 2);
8 _Static_assert (_Generic (void, int : 1, void : 2) == 2);
10 _Static_assert (_Generic (int (), int (*) () : 1, int () : 2) == 2);
12 const int ci;
14 _Static_assert (_Generic (typeof (ci), const int : 1, int : 2) == 1);
16 _Static_assert (_Generic (ci, const int : 1, int : 2) == 2);