On 28/04/25 19:11 +0200, François Dumont wrote:
Hi
Pretty straightforward except for the aligned_storage one for which I
just avoid the check when gnu-versioned-namespace mode is being used.
libstdc++: [_GLIBCXX_INLINE_VERSION] Fix several tests failures
Several tests are failing when libstdc++ is configured with:
--enable-symvers=gnu-versioned-namespace
Most of them are due to dg-error checks not considering the __8
nested namespace.
libstdc++-v3/ChangeLog:
* testsuite/20_util/aligned_storage/value.cc
[_GLIBCXX_INLINE_VERSION]:
Avoid align_msa check.
* testsuite/20_util/function_objects/bind_back/111327.cc:
Adapt dg-error diagnostic
to __8 stdnested namespace.
* testsuite/20_util/function_objects/bind_front/111327.cc:
Likewise.
* testsuite/30_threads/packaged_task/cons/dangling_ref.cc:
Likewise.
* testsuite/30_threads/packaged_task/cons/lwg4154_neg.cc:
Likewise.
* testsuite/std/format/ranges/format_kind_neg.cc: Likewise.
Let me know if you think it worth a backport.
Tested under Linux x86_64 w/o gnu-versioned-namespace mode.
Ok to commit ?
Could you test this instead please?
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -648,6 +648,10 @@ proc v3_target_compile { source dest type options } {
set v3_additional_files {}
set comp_output [target_compile $source $dest $type $options]
+ # Strip versioned namespace from the compiler output,
+ # so that dg-error and dg-warning patterns can ignore it:
+ regsub -all "std::__8::" $comp_output "std::" comp_output
+
if { $type == "executable" && $file_to_delete != "" } {
file delete $file_to_delete
if { [istarget *-*-darwin*] && [file exists $file_to_delete.dSYM] } {
This should mean we never need to use "std::(__8)?::" again :-)