]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: testsuite: adjust name_fortify test for pre-defined _FORTIFY_SOURCE
authorSam James <sam@gentoo.org>
Sun, 13 Oct 2024 22:22:02 +0000 (23:22 +0100)
committerSam James <sam@gentoo.org>
Sun, 13 Oct 2024 22:22:11 +0000 (23:22 +0100)
Otherwise we get failures with toolchains that have _FORTIFY_SOURCE
defined already to a different value like 3.

libstdc++-v3/ChangeLog:

* testsuite/17_intro/names_fortify.cc: Undefine _FORTIFY_SOURCE.

libstdc++-v3/testsuite/17_intro/names_fortify.cc

index c975412074be5195d511421618111d287ff9c5e2..f24af21f8a708678acca4403f3a950d734d63f3a 100644 (file)
@@ -1,6 +1,7 @@
 // { dg-do compile { target *-*-linux* } }
 // { dg-add-options no_pch }
 
+#undef _FORTIFY_SOURCE
 #define _FORTIFY_SOURCE 2
 // Now we can define the macros to poison uses of non-reserved names:
 #include "names.cc"