aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/cpp/has-include-1-traditional.c
blob: b0acdbece4d5011769e7c70108c307ce36c43582 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* { dg-do preprocess { target c } } */
/* { dg-options "-traditional-cpp" } */

#if __has_include ("stdlib.h")
#else
#error error 1
#endif
#if __has_include (<stdlib.h>)
#else
#error error 2
#endif
#if !__has_include ("stdlib.h")
#error error 3
#elif !__has_include (<stdlib.h>)
#error error 4
#endif
#if __has_include ("stdlib.h") && __has_include (<stdlib.h>)
#else
#error error 5
#endif
#if !defined(__has_include)
#error error 6
#endif
#ifndef __has_include
#error error 7
#endif
#ifdef __has_include
#else
#error error 8
#endif
#define m1 __has_include("stdlib.h")
#define m2 <stdlib.h>
#if !m1
#error error 9
#endif
#if !__has_include (m2)
#error error 13
#endif