1 /* Test macro expansions in <stdbool.h> in C2x. */
3 /* { dg-options "-std=c2x -pedantic-errors" } */
10 extern void abort (void);
11 extern void exit (int);
12 extern int strcmp (const char *, const char *);
15 #error "false signed in #if"
19 #error "false not 0 in #if"
23 #error "true signed in #if"
27 #error "true not 1 in #if"
33 if (strcmp (str (bool), "_Bool") != 0)
35 if (_Generic (true, _Bool : 1) != 1)
39 if (strcmp (str (true), "((_Bool)+1u)") != 0)
41 if (_Generic (false, _Bool : 1) != 1)
45 if (strcmp (str (false), "((_Bool)+0u)") != 0)
47 if (strcmp (str (__bool_true_false_are_defined), "1") != 0)