public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* std::experimental and versioned namespace
@ 2023-09-19  5:10 François Dumont
  2023-09-19  8:03 ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: François Dumont @ 2023-09-19  5:10 UTC (permalink / raw)
  To: libstdc++

I'm running 'make check-c++' in gnu-versioned_namespace mode and among 
all the failures are those:

compiler exited with status 1
FAIL: g++.dg/contracts/contracts-access1.C   (test for excess errors)
Excess errors:
contracts-access1.C:(.text._ZN4Base1bEv.pre[_ZN4Base1bEv]+0x64): 
undefined reference to 
`handle_contract_violation(std::experimental::contract_violation const&)'

I still need to find out what's going wrong but I also wonder if we need 
to use the versioned namespace for things in std::experimental namespace 
? Those are already abi unstable, no ?

François


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

* Re: std::experimental and versioned namespace
  2023-09-19  5:10 std::experimental and versioned namespace François Dumont
@ 2023-09-19  8:03 ` Jonathan Wakely
  2023-09-20  4:54   ` François Dumont
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2023-09-19  8:03 UTC (permalink / raw)
  To: François Dumont; +Cc: libstdc++

On Tue, 19 Sept 2023 at 06:10, François Dumont via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> I'm running 'make check-c++' in gnu-versioned_namespace mode and among
> all the failures are those:
>
> compiler exited with status 1
> FAIL: g++.dg/contracts/contracts-access1.C   (test for excess errors)
> Excess errors:
> contracts-access1.C:(.text._ZN4Base1bEv.pre[_ZN4Base1bEv]+0x64):
> undefined reference to
> `handle_contract_violation(std::experimental::contract_violation const&)'

The <experimental/contract> header uses the versioned namespace macros
for the contract_violation type:

namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION

namespace experimental
{

But the compiler expects it to be in the std::experimental namespace.

> I still need to find out what's going wrong but I also wonder if we need
> to use the versioned namespace for things in std::experimental namespace
> ? Those are already abi unstable, no ?

Yes, we can just remove the VERSION macros from the header.


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

* Re: std::experimental and versioned namespace
  2023-09-19  8:03 ` Jonathan Wakely
@ 2023-09-20  4:54   ` François Dumont
  0 siblings, 0 replies; 3+ messages in thread
From: François Dumont @ 2023-09-20  4:54 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++


On 19/09/2023 10:03, Jonathan Wakely wrote:
> On Tue, 19 Sept 2023 at 06:10, François Dumont via Libstdc++
> <libstdc++@gcc.gnu.org> wrote:
>> I'm running 'make check-c++' in gnu-versioned_namespace mode and among
>> all the failures are those:
>>
>> compiler exited with status 1
>> FAIL: g++.dg/contracts/contracts-access1.C   (test for excess errors)
>> Excess errors:
>> contracts-access1.C:(.text._ZN4Base1bEv.pre[_ZN4Base1bEv]+0x64):
>> undefined reference to
>> `handle_contract_violation(std::experimental::contract_violation const&)'
> The <experimental/contract> header uses the versioned namespace macros
> for the contract_violation type:
>
> namespace std _GLIBCXX_VISIBILITY(default)
> {
> _GLIBCXX_BEGIN_NAMESPACE_VERSION
>
> namespace experimental
> {
>
> But the compiler expects it to be in the std::experimental namespace.
>
>> I still need to find out what's going wrong but I also wonder if we need
>> to use the versioned namespace for things in std::experimental namespace
>> ? Those are already abi unstable, no ?
> Yes, we can just remove the VERSION macros from the header.
>
And not from the whole std::experimental world then, surprising.

Patch submitted.


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

end of thread, other threads:[~2023-09-20  4:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-19  5:10 std::experimental and versioned namespace François Dumont
2023-09-19  8:03 ` Jonathan Wakely
2023-09-20  4:54   ` François Dumont

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).