Date: Tue, 11 Aug 2020 10:09:09 +0100
On 11/08/2020 07:37, Uecker, Martin via Liaison wrote:
> I recently proposed changes to the C grammar which got
> voted into C2X by WG14 (N2508, also see N2496).
>
> This allows placing of labels everywhere in a compound
> statement, even before declarations and at the end
> of a block, which was not possible in C so far.
Long overdue! And thank you for the work to fix this.
> It has been pointed out to me that while C++ allows
> labels before declarations, it does not allow them
> at the end of a compound statement.
>
> I plan to propose a change to C++ to make this
> possible too and I wonder if you have any comments
> or suggestions related to this?
My first reaction is simply "just insert a ;". Perhaps that won't be a
common reaction.
Is there any chance that you might propose C standardising computed
gotos? Then Python on MSVC goes +30% faster. You would, quite literally,
save millions of kWh of wasted electricity in the next few decades.
Niall
> I recently proposed changes to the C grammar which got
> voted into C2X by WG14 (N2508, also see N2496).
>
> This allows placing of labels everywhere in a compound
> statement, even before declarations and at the end
> of a block, which was not possible in C so far.
Long overdue! And thank you for the work to fix this.
> It has been pointed out to me that while C++ allows
> labels before declarations, it does not allow them
> at the end of a compound statement.
>
> I plan to propose a change to C++ to make this
> possible too and I wonder if you have any comments
> or suggestions related to this?
My first reaction is simply "just insert a ;". Perhaps that won't be a
common reaction.
Is there any chance that you might propose C standardising computed
gotos? Then Python on MSVC goes +30% faster. You would, quite literally,
save millions of kWh of wasted electricity in the next few decades.
Niall
Received on 2020-08-11 04:12:37