]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/c-c++-common/cpp/pr63831-1.c
Implement C++17 [[maybe_unused]] attribute.
[gcc.git] / gcc / testsuite / c-c++-common / cpp / pr63831-1.c
CommitLineData
1f8d3e84
JJ
1/* PR preprocessor/63831 */
2/* { dg-do compile } */
3
4#ifdef __has_attribute
5typedef char T1[__has_attribute (__noreturn__) == 200809 ? 1 : -1];
6typedef char T2[__has_attribute (alloc_size) == 1 ? 1 : -1];
7typedef char T3[__has_attribute (non_existent_attribuuuute) == 0 ? 1 : -1];
8#endif
9#if __has_attribute (noreturn) == 200809
10typedef char T4;
11#endif
12#define d deprecated
13typedef char T5[__has_attribute (d) == 201309 ? 1 : -1];
14T1 t1;
15T2 t2;
16T3 t3;
17T4 t4;
18T5 t5;
19#ifdef __cplusplus
d067e05f 20typedef char T6[__has_attribute (gnu::__noreturn__) ? 1 : -1];
1f8d3e84
JJ
21typedef char T7[__has_attribute (gnu::alloc_size) == 1 ? 1 : -1];
22typedef char T8[__has_attribute (gnu::non_existent_attribuuuute) == 0 ? 1 : -1];
d067e05f 23#if __has_attribute (gnu::noreturn)
1f8d3e84
JJ
24typedef char T9;
25#endif
26#define d2 gnu::deprecated
27typedef char T10[__has_attribute (d) == 201309 ? 1 : -1];
28T6 t6;
29T7 t7;
30T8 t8;
31T9 t9;
32T10 t10;
33#endif
34#ifdef __has_cpp_attribute
35typedef char T11[__has_cpp_attribute (__noreturn__) == 200809 ? 1 : -1];
36typedef char T12[__has_cpp_attribute (alloc_size) == 1 ? 1 : -1];
37typedef char T13[__has_cpp_attribute (non_existent_attribuuuute) == 0 ? 1 : -1];
38#endif
39#if __has_cpp_attribute (noreturn) == 200809
40typedef char T14;
41#endif
42#define d deprecated
43typedef char T15[__has_cpp_attribute (d) == 201309 ? 1 : -1];
44T11 t11;
45T12 t12;
46T13 t13;
47T14 t14;
48T15 t15;
49#ifdef __cplusplus
d067e05f 50typedef char T16[__has_cpp_attribute (gnu::__noreturn__) ? 1 : -1];
1f8d3e84
JJ
51typedef char T17[__has_cpp_attribute (gnu::alloc_size) == 1 ? 1 : -1];
52typedef char T18[__has_cpp_attribute (gnu::non_existent_attribuuuute) == 0 ? 1 : -1];
d067e05f 53#if __has_cpp_attribute (gnu::noreturn)
1f8d3e84
JJ
54typedef char T19;
55#endif
56#define d2 gnu::deprecated
57typedef char T20[__has_cpp_attribute (d) == 201309 ? 1 : -1];
58T16 t16;
59T17 t17;
60T18 t18;
61T19 t19;
62T20 t20;
63#endif
64int t21 = __has_attribute (noreturn) + __has_cpp_attribute (__malloc__);
This page took 0.862229 seconds and 5 git commands to generate.