public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <iain@sandoe.co.uk>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: Jonathan Wakely <jwakely@redhat.com>,
	libstdc++ <libstdc++@gcc.gnu.org>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix <contracts>
Date: Mon, 9 Oct 2023 10:23:04 +0100	[thread overview]
Message-ID: <E52F35E2-CEE8-4EF6-BB9C-4097C08FE0E9@sandoe.co.uk> (raw)
In-Reply-To: <a9dbd8d4-e740-454d-a7ab-3c5bba3ea04e@gmail.com>



> On 9 Oct 2023, at 06:06, François Dumont <frs.dumont@gmail.com> wrote:
> 
> I think we can do the same without the symbol alias feature. It's even simpler cause do not require any maintenance when version symbol bump.
> 
> Here is what I'm testing, at least exported symbol is fine.

Thanks; works for me, (g++ tests with your patches + a local one to enable versioned-namespace on Darwin).

Iain

> 
> François
> 
> 
> On 08/10/2023 16:06, Iain Sandoe wrote:
>> Hi François,
>> 
>>> On 21 Sep 2023, at 05:41, François Dumont <frs.dumont@gmail.com> wrote:
>>> 
>>> Tests were successful, ok to commit ?
>>> 
>>> On 20/09/2023 19:51, François Dumont wrote:
>>>> libstdc++: [_GLIBCXX_INLINE_VERSION] Add handle_contract_violation symbol alias
>>>> 
>>>> libstdc++-v3/ChangeLog:
>>>> 
>>>>     * src/experimental/contract.cc
>>>>     [_GLIBCXX_INLINE_VERSION](handle_contract_violation): Provide symbol alias
>>>>     without version namespace decoration for gcc.
>> This does not work in the source on targets without support for symbol aliases (Darwin is one)
>> “../experimental/contract.cc:79:8: warning: alias definitions not supported in Mach-O; ignored”
>> 
>> - there might be a way to do it at link-time (for one symbol not too bad); I will have to poke at
>>   it a bit.
>> Iain
>> 
>>>> Here is what I'm testing eventually, ok to commit if successful ?
>>>> 
>>>> François
>>>> 
>>>> On 20/09/2023 11:32, Jonathan Wakely wrote:
>>>>> On Wed, 20 Sept 2023 at 05:51, François Dumont via Libstdc++
>>>>> <libstdc++@gcc.gnu.org> wrote:
>>>>>> libstdc++: Remove std::constract_violation from versioned namespace
>>>>> Spelling mistake in contract_violation, and it's not
>>>>> std::contract_violation, it's std::experimental::contract_violation
>>>>> 
>>>>>> GCC expects this type to be in std namespace directly.
>>>>> Again, it's in std::experimental not in std directly.
>>>>> 
>>>>> Will this change cause problems when including another experimental
>>>>> header, which does put experimental below std::__8?
>>>>> 
>>>>> I think std::__8::experimental and std::experimental will become ambiguous.
>>>>> 
>>>>> Maybe we do want to remove the inline __8 namespace from all
>>>>> experimental headers. That needs a bit more thought though.
>>>>> 
>>>>>> libstdc++-v3/ChangeLog:
>>>>>> 
>>>>>>       * include/experimental/contract:
>>>>>>       Remove _GLIBCXX_BEGIN_NAMESPACE_VERSION/_GLIBCXX_END_NAMESPACE_VERSION.
>>>>> This line is too long for the changelog.
>>>>> 
>>>>>> It does fix 29 g++.dg/contracts in gcc testsuite.
>>>>>> 
>>>>>> Ok to commit ?
>>>>>> 
>>>>>> François
> <contract.patch>


      reply	other threads:[~2023-10-09  9:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20  4:51 François Dumont
2023-09-20  9:32 ` Jonathan Wakely
2023-09-20 17:51   ` François Dumont
2023-09-21  4:41     ` François Dumont
2023-10-08 14:06       ` Iain Sandoe
2023-10-09  5:06         ` François Dumont
2023-10-09  9:23           ` Iain Sandoe [this message]

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=E52F35E2-CEE8-4EF6-BB9C-4097C08FE0E9@sandoe.co.uk \
    --to=iain@sandoe.co.uk \
    --cc=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --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).