aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/cpp/has-include-2.c
blob: 5cd00cb3fb5b0a5626c7d0a320e92db60ca4ed77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* PR preprocessor/110558 */
/* { dg-do preprocess } */
#define STRINGIZE(x) #x
#define GET_INCLUDE(i) STRINGIZE(has-include-i.h)
/* Spaces surrounding the macro args previously caused a problem for __has_include().  */
#if __has_include(GET_INCLUDE(2)) && __has_include(GET_INCLUDE( 2)) && __has_include(GET_INCLUDE( 2 ))
#include GET_INCLUDE(2)
#include GET_INCLUDE( 2)
#include GET_INCLUDE( 2 )
#else
#error "__has_include did not handle padding properly" /* { dg-bogus "__has_include" } */
#endif