On Fri, Sep 11, 2020 at 10:57:21AM -0400, Nathan Sidwell wrote:
> On 9/10/20 10:15 PM, Marek Polacek via Gcc-patches wrote:
> > Since we now have DECL_DECLARED_CONSTINIT_P, we no longer need
> > LOOKUP_CONSTINIT.
> >
> > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk?
>
> looks good, thanks for noticing. BTW, you now have
> > /* Set constexpr flag on vars (functions got it in grokfndecl). */
> > if (constexpr_p && VAR_P (decl))
> > DECL_DECLARED_CONSTEXPR_P (decl) = true;
> > + /* And the constinit flag (which only applies to variables). */
> > + else if (constinit_p && VAR_P (decl))
> > + DECL_DECLARED_CONSTINIT_P (decl) = true;
>
> might that be clearer as
> if (VAR_P (decl))
> { constexpr stuff constinit stuff }
>
> ? Ok either way
Agreed, it'd be nicer to factor VAR_P out. I'll make that change.
Thanks,
Marek