aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/spellcheck-stdbool.c
blob: 088896b51cb725af87ab9995eb666d4d86101591 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-options "-std=c99" } */
/* Missing <stdbool.h>.  */

bool b; /* { dg-error "unknown type name 'bool'" } */
/* { dg-message "'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'" "" { target *-*-* } .-1 } */

int test_true (void)
{
  return true; /* { dg-error "'true' undeclared" } */
  /* { dg-message "'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'" "" { target *-*-* } .-1 } */
}

int test_false (void)
{
  return false; /* { dg-error "'false' undeclared" } */
  /* { dg-message "'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'" "" { target *-*-* } .-1 } */
}