Date: Mon, 09 Feb 2026 15:53:04 -0800
On Monday, 9 February 2026 15:40:49 Pacific Standard Time Barry Revzin wrote:
> And that reason has nothing to do with the alleged ignorability of
> attributes.
>
> It was originally [[align(X)]]. It only changed because C didn't have
> attributes yet and was pursuing _Align(...), so C and C++ unified on
> _Alignas(...) and alignas(...). That's why it's in the spot it's at, and
> why [dcl.align] (not alignas) is under [dcl.attr].
>
> We didn't need a new keyword for aligning anymore than we needed a new
> keyword for overriding.
And yet, neither override, final, nor alignas are ignorable. The program is
ill-formed if it overrides a non-virtual or final virtual, so it shouldn't be
an attribute. And no one is going to argue we needed a syntax compatible with
C for those.
> And that reason has nothing to do with the alleged ignorability of
> attributes.
>
> It was originally [[align(X)]]. It only changed because C didn't have
> attributes yet and was pursuing _Align(...), so C and C++ unified on
> _Alignas(...) and alignas(...). That's why it's in the spot it's at, and
> why [dcl.align] (not alignas) is under [dcl.attr].
>
> We didn't need a new keyword for aligning anymore than we needed a new
> keyword for overriding.
And yet, neither override, final, nor alignas are ignorable. The program is
ill-formed if it overrides a non-virtual or final virtual, so it shouldn't be
an attribute. And no one is going to argue we needed a syntax compatible with
C for those.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel Data Center - Platform & Sys. Eng.
Received on 2026-02-09 23:53:08
