On Fri, Jun 21, 2019 at 04:06:50PM -0400, Jason Merrill wrote:
> On 6/20/19 10:46 AM, Marek Polacek wrote:
> > The first test is rejected because build_noexcept_spec first converts
> > a TARGET_EXPR using a user-defined conversion, creating
> > 
> >    R::operator bool (&TARGET_EXPR <D.2323, {}>)
> > 
> > which then fails when instantiating ("taking address of rvalue").
> > 
> > The second test ICEs in verify_ctor_sanity because there was no ctx.ctor
> > when evaluating the TARGET_EXPR.  That is expected, because we create
> > constructors for class and vector types (and PMFs I guess) only, not for
> > scalars.  We need finish_compound_literal to turn
> > 
> >    TARGET_EXPR <D.2306, {}>
> > 
> > into
> > 
> >    TARGET_EXPR <D.2307, 0>
> > 
> > Fixed both by handling the noexcept expr like we handle the explicit expr in
> > build_explicit_specifier.
> > 
> > Bootstrapped/regtested on x86_64-linux, ok for trunk and 9?
> 
> OK, though this pattern still seems fragile.  I'll try to poke at it soon.

Thanks.  Feel free to ping me if you have any ideas that you'd like me to try
here.

Marek

Reply via email to