Debian Codegraph @

gcc/testsuite/gcc.dg/c23-bool-errors-2.c

raw
1 /* Test error-handling for legacy code that tries to
2 use a variable named "bool" with C23. */
3
4 /* { dg-do compile } */
5 /* { dg-options "-std=c23" } */
6
7 int bool; /* { dg-error "'bool' cannot be used here" } */
8 /* { dg-message "'bool' is a keyword with '-std=c23' onwards" "" { target *-*-* } .-1 } */
9 /* { dg-warning "useless type name in empty declaration" "" { target *-*-* } .-2 } */