Debian Codegraph @

libstdc++-v3/testsuite/18_support/headers/cstdalign/macros.cc

raw
1 // { dg-options "-D_GLIBCXX_USE_DEPRECATED=0 -Wdeprecated" }
2 // { dg-do preprocess }
3
4 #include <cstdalign>
5
6 // { dg-error "ISO C.. 2011" "" { target c++98_only } 0 }
7 // { dg-warning "deprecated" "" { target c++17_only } 0 }
8 // { dg-error "not a standard header" "" { target c++20 } 0 }
9
10 #if __cplusplus >= 201103L
11 #ifndef __alignas_is_defined
12 # error "The header <cstdalign> fails to define a macro named __alignas_is_defined"
13 #elif __alignas_is_defined != 1
14 # error "__alignas_is_defined is not defined to 1 in <cstdalign>"
15 #endif
16
17 #ifndef __alignof_is_defined
18 # error "The header <cstdalign> fails to define a macro named __alignof_is_defined"
19 #elif __alignof_is_defined != 1
20 # error "__alignof_is_defined is not defined to 1 in <cstdalign>"
21 #endif
22
23 #ifdef alignas
24 # error "The header <cstdalign> defines a macro named alignas"
25 #endif
26
27 #ifdef alignof
28 # error "The header <cstdalign> defines a macro named alignof"
29 #endif
30 #endif