| 1 |
// { dg-options "-D_GLIBCXX_USE_DEPRECATED=0 -Wdeprecated" } |
| 2 |
// { dg-do preprocess { target c++11 } } |
| 3 |
// { dg-bogus "deprecated" "C++17 deprecated <cstdbool> but not <stdbool.h>" } |
| 4 |
|
| 5 |
#include <stdbool.h> |
| 6 |
|
| 7 |
#ifndef __bool_true_false_are_defined |
| 8 |
# error "The header <stdbool.h> fails to define a macro named __bool_true_false_are_defined" |
| 9 |
#endif |
| 10 |
|
| 11 |
#ifdef bool |
| 12 |
# error "The header <stdbool.h> defines a macro named bool" |
| 13 |
#endif |
| 14 |
|
| 15 |
#ifdef true |
| 16 |
# error "The header <stdbool.h> defines a macro named true" |
| 17 |
#endif |
| 18 |
|
| 19 |
#ifdef false |
| 20 |
# error "The header <stdbool.h> defines a macro named false" |
| 21 |
#endif |