[PATCH][_GLIBCXX_INLINE_VERSION] Adapt dg-error messages

2024-02-21 Thread François Dumont
For those using my patch to build in gnu-versioned-namespace mode it 
would be preferable not to have any failures when running testsuite.


    libstdc++: [_GLIBCXX_INLINE_VERSION] Adapt dg-error message

    libstdc++-v3/ChangeLog:

    * testsuite/20_util/function_objects/bind_back/111327.cc: 
Adapt dg-error message

    for __8 namespace.
    * testsuite/20_util/function_objects/bind_front/111327.cc: 
Likewise.


Ok to commit ?

François
diff --git 
a/libstdc++-v3/testsuite/20_util/function_objects/bind_back/111327.cc 
b/libstdc++-v3/testsuite/20_util/function_objects/bind_back/111327.cc
index d634db9dc1d..f8a65127ccf 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/bind_back/111327.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/bind_back/111327.cc
@@ -39,4 +39,4 @@ int main() {
   std::move(std::as_const(g1))();
 }
 
-// { dg-error "no type named 'type' in 'struct std::invoke_result" "" { target 
c++23 } 0 }
+// { dg-error "no type named 'type' in 'struct std::(__8::)?invoke_result" "" 
{ target c++23 } 0 }
diff --git 
a/libstdc++-v3/testsuite/20_util/function_objects/bind_front/111327.cc 
b/libstdc++-v3/testsuite/20_util/function_objects/bind_front/111327.cc
index 5fe0a83baec..896492b3d74 100644
--- a/libstdc++-v3/testsuite/20_util/function_objects/bind_front/111327.cc
+++ b/libstdc++-v3/testsuite/20_util/function_objects/bind_front/111327.cc
@@ -39,4 +39,4 @@ int main() {
   std::move(std::as_const(g1))();
 }
 
-// { dg-error "no type named 'type' in 'struct std::invoke_result" "" { target 
c++23 } 0 }
+// { dg-error "no type named 'type' in 'struct std::(__8::)?invoke_result" "" 
{ target c++23 } 0 }


Re: [PATCH][_GLIBCXX_INLINE_VERSION] Adapt dg error messages

2022-11-28 Thread François Dumont via Gcc-patches

On 28/11/22 14:39, Jonathan Wakely wrote:



On Mon, 28 Nov 2022 at 10:08, Jonathan Wakely  wrote:



On Mon, 28 Nov 2022 at 10:06, Jonathan Wakely 
wrote:



On Mon, 28 Nov 2022 at 06:02, François Dumont via Libstdc++
mailto:libstdc%2b...@gcc.gnu.org>> wrote:

libstdc++: [_GLIBCXX_INLINE_VERSION] Adapt dg error messages

libstdc++-v3/ChangeLog

 * testsuite/20_util/bind/ref_neg.cc: Adapt
dg-prune-output message.
 * testsuite/20_util/function/cons/70692.cc: Adapt
dg-error message.

Ok to commit ?


OK, thanks.



Actually wait, can you test this instead?

--- a/libstdc++-v3/testsuite/lib/prune.exp
+++ b/libstdc++-v3/testsuite/lib/prune.exp
@@ -37,6 +37,8 @@ proc libstdc++-dg-prune { system text } {
      return "::unsupported::hosted C++ headers not supported"
    }

+    regsub -all "std::__8::" $text "std::" text
+
    # Ignore caret diagnostics. Unfortunately dejaGNU trims leading
    # spaces, so one cannot rely on them being present.
    regsub -all "(^|\n)\[^\n\]+\n *\\^\n" $text "\n" text

This should mean we can stop needing to make these changes to
every test, and just write the tests naturally.


That only helps for dg-prune-output but we still need to (__8::)? for 
dg-error.


Please push your change to 20_util/function/cons/70692.cc but not the 
change to 20_util/bind/ref_neg.cc (the latter will get fixed after I 
pushed the prune.expo change).



Done as requested and I confirm that prune.exp enhancement fixed 
20_util/bind/ref_neg.cc.


Thanks


Re: [PATCH][_GLIBCXX_INLINE_VERSION] Adapt dg error messages

2022-11-28 Thread Jonathan Wakely via Gcc-patches
On Mon, 28 Nov 2022 at 10:08, Jonathan Wakely  wrote:

>
>
> On Mon, 28 Nov 2022 at 10:06, Jonathan Wakely  wrote:
>
>>
>>
>> On Mon, 28 Nov 2022 at 06:02, François Dumont via Libstdc++ <
>> libstd...@gcc.gnu.org> wrote:
>>
>>> libstdc++: [_GLIBCXX_INLINE_VERSION] Adapt dg error messages
>>>
>>> libstdc++-v3/ChangeLog
>>>
>>>  * testsuite/20_util/bind/ref_neg.cc: Adapt dg-prune-output
>>> message.
>>>  * testsuite/20_util/function/cons/70692.cc: Adapt dg-error
>>> message.
>>>
>>> Ok to commit ?
>>>
>>>
>> OK, thanks.
>>
>>
>>
> Actually wait, can you test this instead?
>
> --- a/libstdc++-v3/testsuite/lib/prune.exp
> +++ b/libstdc++-v3/testsuite/lib/prune.exp
> @@ -37,6 +37,8 @@ proc libstdc++-dg-prune { system text } {
>   return "::unsupported::hosted C++ headers not supported"
> }
>
> +regsub -all "std::__8::" $text "std::" text
> +
> # Ignore caret diagnostics. Unfortunately dejaGNU trims leading
> # spaces, so one cannot rely on them being present.
> regsub -all "(^|\n)\[^\n\]+\n *\\^\n" $text "\n" text
>
> This should mean we can stop needing to make these changes to every test,
> and just write the tests naturally.
>

That only helps for dg-prune-output but we still need to (__8::)? for
dg-error.

Please push your change to 20_util/function/cons/70692.cc but not the
change to 20_util/bind/ref_neg.cc (the latter will get fixed after I pushed
the prune.expo change).


Re: [PATCH][_GLIBCXX_INLINE_VERSION] Adapt dg error messages

2022-11-28 Thread Jonathan Wakely via Gcc-patches
On Mon, 28 Nov 2022 at 10:06, Jonathan Wakely  wrote:

>
>
> On Mon, 28 Nov 2022 at 06:02, François Dumont via Libstdc++ <
> libstd...@gcc.gnu.org> wrote:
>
>> libstdc++: [_GLIBCXX_INLINE_VERSION] Adapt dg error messages
>>
>> libstdc++-v3/ChangeLog
>>
>>  * testsuite/20_util/bind/ref_neg.cc: Adapt dg-prune-output
>> message.
>>  * testsuite/20_util/function/cons/70692.cc: Adapt dg-error
>> message.
>>
>> Ok to commit ?
>>
>>
> OK, thanks.
>
>
>
Actually wait, can you test this instead?

--- a/libstdc++-v3/testsuite/lib/prune.exp
+++ b/libstdc++-v3/testsuite/lib/prune.exp
@@ -37,6 +37,8 @@ proc libstdc++-dg-prune { system text } {
  return "::unsupported::hosted C++ headers not supported"
}

+regsub -all "std::__8::" $text "std::" text
+
# Ignore caret diagnostics. Unfortunately dejaGNU trims leading
# spaces, so one cannot rely on them being present.
regsub -all "(^|\n)\[^\n\]+\n *\\^\n" $text "\n" text

This should mean we can stop needing to make these changes to every test,
and just write the tests naturally.


Re: [PATCH][_GLIBCXX_INLINE_VERSION] Adapt dg error messages

2022-11-28 Thread Jonathan Wakely via Gcc-patches
On Mon, 28 Nov 2022 at 06:02, François Dumont via Libstdc++ <
libstd...@gcc.gnu.org> wrote:

> libstdc++: [_GLIBCXX_INLINE_VERSION] Adapt dg error messages
>
> libstdc++-v3/ChangeLog
>
>  * testsuite/20_util/bind/ref_neg.cc: Adapt dg-prune-output
> message.
>  * testsuite/20_util/function/cons/70692.cc: Adapt dg-error
> message.
>
> Ok to commit ?
>
>
OK, thanks.


[PATCH][_GLIBCXX_INLINE_VERSION] Adapt dg error messages

2022-11-27 Thread François Dumont via Gcc-patches

libstdc++: [_GLIBCXX_INLINE_VERSION] Adapt dg error messages

libstdc++-v3/ChangeLog

    * testsuite/20_util/bind/ref_neg.cc: Adapt dg-prune-output message.
    * testsuite/20_util/function/cons/70692.cc: Adapt dg-error message.

Ok to commit ?

François
diff --git a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
index a78935775c2..830b30eae6c 100644
--- a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
@@ -50,7 +50,7 @@ void test02()
 
 // Ignore the reasons for deduction/substitution failure in the headers.
 // Arrange for the match to work on installed trees as well as build trees.
-// { dg-prune-output "no type named 'type' in 'struct std::result_of" }
+// { dg-prune-output "no type named 'type' in 'struct std::(__8::)?result_of" }
 
 int main()
 {
diff --git a/libstdc++-v3/testsuite/20_util/function/cons/70692.cc b/libstdc++-v3/testsuite/20_util/function/cons/70692.cc
index f9e8fe31570..b15208a2531 100644
--- a/libstdc++-v3/testsuite/20_util/function/cons/70692.cc
+++ b/libstdc++-v3/testsuite/20_util/function/cons/70692.cc
@@ -11,4 +11,4 @@ int main()
   std::function ff(f);  // { dg-error "no matching function" }
   std::function f2(f);  // { dg-error "no matching function" }
 }
-// { dg-error "std::enable_if" "" { target *-*-* } 0 }
+// { dg-error "std::(__8::)?enable_if" "" { target *-*-* } 0 }