public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix 48631_neg test in _GLIBCXX_VERSION_NAMESPACE mode
@ 2021-09-27 20:25 François Dumont
  2021-09-27 21:06 ` Jonathan Wakely
  0 siblings, 1 reply; 4+ messages in thread
From: François Dumont @ 2021-09-27 20:25 UTC (permalink / raw)
  To: libstdc++; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 286 bytes --]

Here is a small patch to fix a test which fails in 
_GLIBCXX_VERSION_NAMESPACE mode.

IMHO it would be better to avoid putting <type_traits> content in 
versioned namespace, no ?

There is of course more work to do, so for now here is the simpler approach.

Ok to commit ?

François



[-- Attachment #2: 48631_neg.cc.patch --]
[-- Type: text/x-patch, Size: 563 bytes --]

diff --git a/libstdc++-v3/testsuite/20_util/default_delete/48631_neg.cc b/libstdc++-v3/testsuite/20_util/default_delete/48631_neg.cc
index 3e80b73603e..f710806ef42 100644
--- a/libstdc++-v3/testsuite/20_util/default_delete/48631_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/default_delete/48631_neg.cc
@@ -26,4 +26,4 @@ struct D : B { };
 D d;
 std::default_delete<B[]> db;
 typedef decltype(db(&d)) type; // { dg-error "no match" }
-// { dg-prune-output "no type named 'type' in 'struct std::enable_if" }
+// { dg-prune-output "no type named 'type' in 'struct" }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix 48631_neg test in _GLIBCXX_VERSION_NAMESPACE mode
  2021-09-27 20:25 Fix 48631_neg test in _GLIBCXX_VERSION_NAMESPACE mode François Dumont
@ 2021-09-27 21:06 ` Jonathan Wakely
  2021-09-28 20:20   ` François Dumont
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Wakely @ 2021-09-27 21:06 UTC (permalink / raw)
  To: François Dumont; +Cc: libstdc++, gcc-patches

On Mon, 27 Sept 2021 at 21:26, François Dumont via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> Here is a small patch to fix a test which fails in
> _GLIBCXX_VERSION_NAMESPACE mode.
>
> IMHO it would be better to avoid putting <type_traits> content in
> versioned namespace, no ?
>
> There is of course more work to do, so for now here is the simpler approach.
>
> Ok to commit ?

Leaving the pattern ending with just "struct" isn't very useful.
Wouldn't it be better to do:

// { dg-prune-output "no type named 'type' in" }

or just:

// { dg-prune-output "enable_if" }

?

Either of those is OK to commit.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix 48631_neg test in _GLIBCXX_VERSION_NAMESPACE mode
  2021-09-27 21:06 ` Jonathan Wakely
@ 2021-09-28 20:20   ` François Dumont
  2021-09-28 20:26     ` Jonathan Wakely
  0 siblings, 1 reply; 4+ messages in thread
From: François Dumont @ 2021-09-28 20:20 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++, gcc-patches

On 27/09/21 11:06 pm, Jonathan Wakely wrote:
> On Mon, 27 Sept 2021 at 21:26, François Dumont via Libstdc++
> <libstdc++@gcc.gnu.org> wrote:
>> Here is a small patch to fix a test which fails in
>> _GLIBCXX_VERSION_NAMESPACE mode.
>>
>> IMHO it would be better to avoid putting <type_traits> content in
>> versioned namespace, no ?

No opinion on this, you prefer to use consistently the versioned namespace ?


>>
>> There is of course more work to do, so for now here is the simpler approach.
>>
>> Ok to commit ?
> Leaving the pattern ending with just "struct" isn't very useful.
> Wouldn't it be better to do:
>
> // { dg-prune-output "no type named 'type' in" }
>
> or just:
>
> // { dg-prune-output "enable_if" }
>
> ?
>
> Either of those is OK to commit.

Done with "enable_if"


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix 48631_neg test in _GLIBCXX_VERSION_NAMESPACE mode
  2021-09-28 20:20   ` François Dumont
@ 2021-09-28 20:26     ` Jonathan Wakely
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Wakely @ 2021-09-28 20:26 UTC (permalink / raw)
  To: François Dumont; +Cc: Jonathan Wakely, libstdc++, gcc-patches

On Tue, 28 Sept 2021 at 21:21, François Dumont via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> On 27/09/21 11:06 pm, Jonathan Wakely wrote:
> > On Mon, 27 Sept 2021 at 21:26, François Dumont via Libstdc++
> > <libstdc++@gcc.gnu.org> wrote:
> >> Here is a small patch to fix a test which fails in
> >> _GLIBCXX_VERSION_NAMESPACE mode.
> >>
> >> IMHO it would be better to avoid putting <type_traits> content in
> >> versioned namespace, no ?
>
> No opinion on this, you prefer to use consistently the versioned namespace ?

I haven't though about it in much detail, but I think it's safer to
keep them in the versioned namespace.

Can we be sure that we'd never need to make any incompatible changes
to anything in that header? It seems likely, but I'm not entirely
confident.


> >> There is of course more work to do, so for now here is the simpler approach.
> >>
> >> Ok to commit ?
> > Leaving the pattern ending with just "struct" isn't very useful.
> > Wouldn't it be better to do:
> >
> > // { dg-prune-output "no type named 'type' in" }
> >
> > or just:
> >
> > // { dg-prune-output "enable_if" }
> >
> > ?
> >
> > Either of those is OK to commit.
>
> Done with "enable_if"

Thanks.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-28 20:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 20:25 Fix 48631_neg test in _GLIBCXX_VERSION_NAMESPACE mode François Dumont
2021-09-27 21:06 ` Jonathan Wakely
2021-09-28 20:20   ` François Dumont
2021-09-28 20:26     ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).