public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Patrick Palka <ppalka@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [pushed] c++: module std and exception_ptr
Date: Thu, 13 Jun 2024 11:24:13 -0400	[thread overview]
Message-ID: <2484ef76-bd42-4182-9b21-f2449fec1784@redhat.com> (raw)
In-Reply-To: <9452d759-d456-60fb-939e-3720d90b6eb1@idea>

On 6/13/24 11:16, Patrick Palka wrote:
> On Wed, 12 Jun 2024, Jason Merrill wrote:
> 
>> exception_ptr.h contains
>>
>>    namespace __exception_ptr
>>    {
>>      class exception_ptr;
>>    }
>>    using __exception_ptr::exception_ptr;
>>
>> so when module std tries to 'export using std::exception_ptr', it names
>> another using-directive rather than the class directly, so __exception_ptr
>> is never explicitly opened in module purview.
> 
> FWIW PR100134 ICEd in the same way, and r13-3236-g9736a42e1fb8df
> narrowly fixed this by setting DECL_MODULE_PURVIEW_P on the enclosing
> namespace around the time we set the flag on the namespace-scope entity in
> question.  I wonder if it'd be preferable to do something similar here,
> e.g. set DECL_MODULE_PURVIEW_P on the enclosing namespace in
> do_nonmember_using_decl?

Interesting thought, but I don't think so, as this is a workaround for 
the broader 114683 problem; we shouldn't actually be setting 
DECL_MODULE_PURVIEW_P on the class, either, only the using-declaration.
The problem is that we don't currently represent the using in a way that 
we can set flags on specifically.

Jason


      reply	other threads:[~2024-06-13 15:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12 20:30 Jason Merrill
2024-06-13 15:16 ` Patrick Palka
2024-06-13 15:24   ` Jason Merrill [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=2484ef76-bd42-4182-9b21-f2449fec1784@redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ppalka@redhat.com \
    /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).