libstdc++: testsuite: adjust name_fortify test for pre-defined _FORTIFY_SOURCE

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.
This commit is contained in:
Sam James 2024-10-13 23:22:02 +01:00
parent 27f6b376e8
commit 90a4851b08
No known key found for this signature in database
GPG key ID: 738409F520DF9190

View 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"