| 1 |
// { dg-options "-D_GLIBCXX_USE_DEPRECATED=0 -Wdeprecated" } |
| 2 |
// { dg-do preprocess { target c++11 } } |
| 3 |
// { dg-bogus "deprecated" "C++17 deprecated <cstdalign> but not <stdalign.h>" } |
| 4 |
|
| 5 |
#include <stdalign.h> |
| 6 |
|
| 7 |
#ifndef __alignas_is_defined |
| 8 |
# error "The header <stdalign.h> fails to define a macro named __alignas_is_defined" |
| 9 |
#elif __alignas_is_defined != 1 |
| 10 |
# error "__alignas_is_defined is not defined to 1 in <stdalign.h>" |
| 11 |
#endif |
| 12 |
|
| 13 |
#ifndef __alignof_is_defined |
| 14 |
# error "The header <stdalign.h> fails to define a macro named __alignof_is_defined" |
| 15 |
#elif __alignof_is_defined != 1 |
| 16 |
# error "__alignof_is_defined is not defined to 1 in <stdalign.h>" |
| 17 |
#endif |
| 18 |
|
| 19 |
#ifdef alignas |
| 20 |
# error "The header <stdalign.h> defines a macro named alignas" |
| 21 |
#endif |
| 22 |
|
| 23 |
#ifdef alignof |
| 24 |
# error "The header <stdalign.h> defines a macro named alignof" |
| 25 |
#endif |