| 1 |
/* { dg-do preprocess { target c } } */ |
| 2 |
/* { dg-options "-traditional-cpp" } */ |
| 3 |
|
| 4 |
#if __has_include ("stdlib.h") |
| 5 |
#else |
| 6 |
#error error 1 |
| 7 |
#endif |
| 8 |
#if __has_include (<stdlib.h>) |
| 9 |
#else |
| 10 |
#error error 2 |
| 11 |
#endif |
| 12 |
#if !__has_include ("stdlib.h") |
| 13 |
#error error 3 |
| 14 |
#elif !__has_include (<stdlib.h>) |
| 15 |
#error error 4 |
| 16 |
#endif |
| 17 |
#if __has_include ("stdlib.h") && __has_include (<stdlib.h>) |
| 18 |
#else |
| 19 |
#error error 5 |
| 20 |
#endif |
| 21 |
#if !defined(__has_include) |
| 22 |
#error error 6 |
| 23 |
#endif |
| 24 |
#ifndef __has_include |
| 25 |
#error error 7 |
| 26 |
#endif |
| 27 |
#ifdef __has_include |
| 28 |
#else |
| 29 |
#error error 8 |
| 30 |
#endif |
| 31 |
#define m1 __has_include("stdlib.h") |
| 32 |
#define m2 <stdlib.h> |
| 33 |
#if !m1 |
| 34 |
#error error 9 |
| 35 |
#endif |
| 36 |
#if !__has_include (m2) |
| 37 |
#error error 13 |
| 38 |
#endif |