diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C index fe7a4c2..f8a87a8 100644 --- a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C +++ b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C @@ -345,11 +345,19 @@ #endif #ifdef __has_cpp_attribute + # if ! __has_cpp_attribute(maybe_unused) # error "__has_cpp_attribute(maybe_unused)" # elif __has_cpp_attribute(maybe_unused) != 201603 # error "__has_cpp_attribute(maybe_unused) != 201603" # endif + +# if ! __has_cpp_attribute(nodiscard) +# error "__has_cpp_attribute(nodiscard)" +# elif __has_cpp_attribute(nodiscard) != 201603 +# error "__has_cpp_attribute(nodiscard) != 201603" +# endif + #else # error "__has_cpp_attribute" #endif |