annotate gcc/testsuite/gcc.dg/spellcheck-stdbool.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 /* { dg-options "-std=c99" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2 /* Missing <stdbool.h>. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4 bool b; /* { dg-error "unknown type name 'bool'" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5 /* { dg-message "'bool' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?" "" { target *-*-* } .-1 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7 int test_true (void)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9 return true; /* { dg-error "'true' undeclared" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10 /* { dg-message "'true' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?" "" { target *-*-* } .-1 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13 int test_false (void)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15 return false; /* { dg-error "'false' undeclared" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
16 /* { dg-message "'false' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?" "" { target *-*-* } .-1 } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
17 }