This proc should use -std=gnu++29 but I forgot to update it in
r17-1905-g70e630b6d29b75 so it's now out of date. Replace the hardcoded
option by reusing the existing $v3_max_std variable defined earlier.
libstdc++-v3/ChangeLog:
* testsuite/lib/libstdc++.exp (check_v3_target_cpp_feature_test):
Use $v3_max_std variable instead of hardcoding the latest -std
option.
---
Pushed to trunk.
libstdc++-v3/testsuite/lib/libstdc++.exp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp
b/libstdc++-v3/testsuite/lib/libstdc++.exp
index a7b66fe9784b..4cdf90d3864b 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -1181,13 +1181,13 @@ proc v3_check_preprocessor_condition { name cond { inc
"" } } {
# Return 1 if libstdc++ defines macro for the current target, 0 otherwise.
proc check_v3_target_cpp_feature_test { cond } {
+ global v3_max_std
global cxxflags
set cxxflags_saved $cxxflags
# Use the latest standard, so that all feature test macros are defined.
# We need to do it here, because this check happens before v3-dg-runtest
# runs its loop to test multiple times with different -std options.
- # This should be updated when a new -std is added.
- set cxxflags "$cxxflags -std=gnu++26"
+ set cxxflags "$cxxflags -std=gnu++$v3_max_std"
set inc "#include <version>"
set result [v3_check_preprocessor_condition cpp_feature_test "$cond" $inc]
set cxxflags $cxxflags_saved
--
2.55.0