| 1 |
// PR preprocessor/80005 |
| 2 |
// { dg-do preprocess } |
| 3 |
// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } |
| 4 |
|
| 5 |
#undef vector |
| 6 |
#define vector NOPE |
| 7 |
#ifdef __has_include |
| 8 |
|
| 9 |
#if !__has_include (<vector>) |
| 10 |
#error "Header 'vector' could not be found" |
| 11 |
#endif |
| 12 |
#define F(X) __has_include (X) |
| 13 |
#if !F (<vector>) |
| 14 |
#error "Header 'vector' could not be found" // { dg-error "not be found" } |
| 15 |
#endif |
| 16 |
|
| 17 |
#if __has_include ("not an escape! \") // comment |
| 18 |
#endif |
| 19 |
|
| 20 |
#if F ("is an escape \") gibberish ") |
| 21 |
#endif |
| 22 |
|
| 23 |
#else |
| 24 |
#error "No __has_include" |
| 25 |
#endif |