Subject: Re: bug#72695: CC Mode 5.35.2 (C++//l); c++-mode misindents 'if constexpr' inside lambdas

From: Arsen Arsenović <[email-masked]>
Date: Thu, 26 Sep 2024 22:14:28 +0200

Hi Alan,

Alan Mackenzie <[email-masked]> writes:

> Sorry to keep going on about this, but ....
>
>> I think so, through the 2nd lambda-expression derivation:
>
> I'm interpreting this as being the answer to "Is that first .... alignas
> correct?", not a comment on my second sentence "My reading of ...., not
> before it.".  If I'm mistaken there, then my next paragraph is without
> effect, and I apologise.

Ah!  Please forgive me, I misread the standard.

>>   lambda-introducer < template-parameter-list > requires-clause_opt
>>     attribute-specifier-seq_opt lambda-declarator compound-statement
>
>> ... where attribute-specifier-seq is:
>
>>   attribute-specifier-seq_opt attribute-specifier
>
>> ... and attribute-specifier is also possibly alignment-specifier.
>
>> Maybe I am missing something, though?
>
> ..... My reading of that lambda-expression derivation is that the "alignas
> (128)" is the atribute-specifier-seq_opt, and the "requires
> some_concept<T>" is the requires-clause_opt.  Surely the first of these,
> the "alignas" needs to come after the second, the "requires"?
>
> Phew!

Yes!  You're completely right, I accidentally "combined" the two cases
of lambda-expression while writing that example.  Forgive me.

(serves me right for bug-reporting late.. ;-) )

> [ .... ]
>
>> > Even it the patch is good, I'm not quite ready to commit it yet, since I
>> > need to amend the test suite somewhat.
>
>> I will test it at a later time tonight or tomorrow.  Sorry for the
>> delay.
>
> I got your other post where you reported on that the tests you did were
> satisfactory.  Thanks for that!
>
> I'm hoping to get the patch committed before the weekend.

Yay!  :-)

Thank you very much!

Have a lovely night.
-- 
Arsen Arsenović