public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "François Dumont" <frs.dumont@gmail.com>
To: Iain Sandoe <iain@sandoe.co.uk>
Cc: GCC Development <gcc@gcc.gnu.org>,
	libstdc++ <libstdc++@gcc.gnu.org>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix coroutine tests for libstdc++ gnu-version-namespace mode
Date: Wed, 11 Oct 2023 06:49:02 +0200	[thread overview]
Message-ID: <aae098b6-be76-4eef-b2c0-7f78021ab18d@gmail.com> (raw)
In-Reply-To: <324ED72B-E687-4B5E-AD6E-C7A3BBDEB223@sandoe.co.uk>


On 08/10/2023 15:59, Iain Sandoe wrote:
> Hi François,
>
>> On 23 Sep 2023, at 21:10, François Dumont <frs.dumont@gmail.com> wrote:
>>
>> I'm eventually fixing those tests the same way we manage this problem in libstdc++ testsuite.
>>
>>     testsuite: Add optional libstdc++ version namespace in expected diagnostic
>>
>>      When libstdc++ is build with --enable-symvers=gnu-versioned-namespace diagnostics are
>>      showing this namespace, currently __8.
>>
>>      gcc/testsuite/ChangeLog:
>>
>>              * testsuite/g++.dg/coroutines/coro-bad-alloc-00-bad-op-new.C: Add optional
>>              '__8' version namespace in expected diagnostic.
>>              * testsuite/g++.dg/coroutines/coro-bad-alloc-01-bad-op-del.C: Likewise.
>>              * testsuite/g++.dg/coroutines/coro-bad-alloc-02-no-op-new-nt.C: Likewise.
>>              * testsuite/g++.dg/coroutines/coro-bad-grooaf-01-grooaf-expected.C: Likewise.
>>              * testsuite/g++.dg/coroutines/pr97438.C: Likewise.
>>              * testsuite/g++.dg/coroutines/ramp-return-b.C: Likewise.
>>
>> Tested under Linux x86_64.
>>
>> I'm contributing to libstdc++ so I already have write access.
>>
>> Ok to commit ?
> As author of the tests, this LGTM as a suitable fix for now (at least, once the main
> patch to fix versioned namespaces lands).

I just realized it was a "go", no ? Then why after the main patch ?

The "main patch" do not fix the versioned namespace. It just makes it 
adopt the cxx11 abi.

This patch fixes a problem that is as old as the tests and that is 
totally unrelated with the main one. I just wanted to improve the 
situation so that versioned namespace mode do not look more buggy than 
necessary when someone (like you) run those.

>
> However, IMO, this could become quite painful as more g++ tests make use of std headers
> (which is not really optional for facilities like this that are tightly-coupled between the FE and
> the library).
>
> For the future, it does seem that a more complete solution might be to introduce a
> testsuite-wide definition for the C++ versioned std:: introducer, so that we can update it in one
> place as the version changes.
>
> So (as a thought experiment):
>   - we’d have something of the form “CXX_STD” as a tcl global
>   - we’d add the presence/absence of versioning to the relevant site.exp (which
>     means recognising the versioning choice also in the GCC configure)
>   - we’d migrate tests to using ${CXX_STD} instead of "std::__N”  in matches
>
> … I guess an alternative could be to cook up some alternate warning/error/etc
>     match functions that cater for arbitrary inline namespaces but that seems like a much
>     more tricky and invasive testsuite change.
>
> thoughts?

I considered amending gcc/testsuite/lib/prune.exp to simply remove the 
version from the diagnostic. But the reply on why it was not working 
scared me, so this patch.

https://gcc.gnu.org/pipermail/gcc/2023-September/242526.html


  reply	other threads:[~2023-10-11  4:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-23 20:10 François Dumont
2023-10-02 17:07 ` François Dumont
2023-10-03  9:52   ` Jonathan Wakely
2023-10-03 20:14     ` François Dumont
2023-10-08 13:59 ` Iain Sandoe
2023-10-11  4:49   ` François Dumont [this message]
2023-10-11  7:30     ` Iain Sandoe
2023-10-11 17:22       ` François Dumont

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aae098b6-be76-4eef-b2c0-7f78021ab18d@gmail.com \
    --to=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).