Fix dg-prune-output regex for versioned namespace

Jonathan Wakely jwakely@redhat.com
Thu Oct 25 11:16:00 GMT 2018


On 24/10/18 21:30 +0200, François Dumont wrote:
>Some tests dg-prune-output regex need to be adapted to pass when 
>versioned namespace is activated.
>
>I preferred to add the version namespace in the regex rather than 
>removing namespace qualification. Let me know if you would prefer the 
>other approach.
>
>    * testsuite/23_containers/deque/48101_neg.cc: Add optional version
>    namespace in dg-prune-output regex.
>    * testsuite/23_containers/vector/48101_neg.cc: Likewise.
>    * testsuite/27_io/filesystem/path/io/dr2989.cc: Likewise.
>
>Tested under Linux x86_64 with and without versioned namespace.
>
>Ok to commit ?

We can just simplify them instead of making them more complicated.

>François
>

>diff --git a/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc
>index 1f9e3e3b932..6f5a648e059 100644
>--- a/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc
>+++ b/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc
>@@ -26,5 +26,5 @@ test01()
> }
> 
> // { dg-error "non-const, non-volatile value_type" "" { target *-*-* } 0 }
>-// { dg-prune-output "std::allocator<.* has no member named " }
>+// { dg-prune-output "std::(__8::)?allocator<.* has no member named " }

Please just use "::allocator<.* has no member named "


> // { dg-prune-output "must have the same value_type as its allocator" }
>diff --git a/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc
>index 620170d0a15..709fc7e1649 100644
>--- a/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc
>+++ b/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc
>@@ -26,5 +26,5 @@ test01()
> }
> 
> // { dg-error "non-const, non-volatile value_type" "" { target *-*-* } 0 }
>-// { dg-prune-output "std::allocator<.* has no member named " }
>+// { dg-prune-output "std::(__8::)?allocator<.* has no member named " }

Same here.

> // { dg-prune-output "must have the same value_type as its allocator" }
>diff --git a/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc b/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc
>index b9a1235e1fe..72eedf50d21 100644
>--- a/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc
>+++ b/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc
>@@ -32,4 +32,4 @@ void foo(std::iostream& s) {
>   s << p; // { dg-error "no match" }
>   s >> p; // { dg-error "no match" }
> }
>-// { dg-prune-output "no type .* std::enable_if" }
>+// { dg-prune-output "no type .* std::(__8::)?enable_if" }

And just "no type .*::enable_if" here.




More information about the Libstdc++ mailing list