]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Adjust 'g++.dg/ext/has-feature.C' for default-'-fno-exceptions', '-fno-rtti' configur...
authorThomas Schwinge <thomas@codesourcery.com>
Tue, 28 Nov 2023 14:57:09 +0000 (15:57 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Wed, 29 Nov 2023 13:12:56 +0000 (14:12 +0100)
..., where you currently get:

    FAIL: g++.dg/ext/has-feature.C  -std=gnu++98 (test for excess errors)
    [...]

Minor fix-up for recent commit 06280a906cb3dc80cf5e07cf3335b758848d488d
"c-family: Implement __has_feature and __has_extension [PR60512]".

gcc/testsuite/
* g++.dg/ext/has-feature.C: Adjust for default-'-fno-exceptions',
'-fno-rtti' configurations.

gcc/testsuite/g++.dg/ext/has-feature.C

index 52191b78fd62c9a6724b8152d3ee92978008d14a..bcfe82469aee9cedba26c070f627e20095b59145 100644 (file)
@@ -5,7 +5,11 @@
 #define CXX11 (__cplusplus >= 201103L)
 #define CXX14 (__cplusplus >= 201402L)
 
-#if !FEAT(cxx_exceptions) || !FEAT(cxx_rtti)
+#if FEAT(cxx_exceptions) != !!__cpp_exceptions
+#error
+#endif
+
+#if FEAT(cxx_rtti) != !!__cpp_rtti
 #error
 #endif