Date: Mon, 12 Feb 2024 18:36:52 +0100
On 12/02/2024 15.13, Arthur O'Dwyer via SG14 wrote:
> On Mon, Feb 12, 2024 at 7:04 AM Patrice Roy via SG14 <sg14_at_[hidden] <mailto:sg14_at_[hidden]>> wrote:
>
>
> * P3132 Accept attributes with user-defined prefixes
> * P3134 Attribute [[asserts_rvo]]
>
> P3132 aims to make it easier to do tooling through user-defined attributes and has a number of additional upsides.
> P3134 aims to provide guarantees that a function's implementation can make it possible for appropriately written calls to that function to lead to the return value optimization
>
> [...] If you would be so kind as to (a) take a look at them, and ideally (b) provide suggestions / constructive criticism on this list or at the SG14 meeting this week, I would integrate this feedback into the official papers. In particular, I get the impression that the audience should be LEWG but I'd be open to knowing what the groups thinks.
>
>
> Both papers propose core-language features with no library impact, so they should be EWG (in fact, EWGI).
Yes, fully agreed.
> Here's my feedback on P3132: *I think it's mistaken and DOA.*
Yes. See [dcl.attr.grammar] p6:
"For an attribute-token (including an attribute-scoped-token) not specified in this document, the behavior is
implementation-defined; any such attribute-token that is not recognized by the implementation is ignored."
So, the standard already says all you want it to say: It allows unknown attributes,
and requires implementations to ignore them. (Implementations are always allowed
to issue warnings, regardless of what the standard says otherwise, though.)
If you feel a compiler feature such as "don't warn on unknown attributes with prefix X"
would be helpful, then that's a feature request for your compiler, not for the standard.
If I've misunderstood your proposal, please explain to me what your
proposal is, ideally presenting wording changes for [dcl.attr.grammar]
(or wherever else you think amendments need to be made).
Jens
> On Mon, Feb 12, 2024 at 7:04 AM Patrice Roy via SG14 <sg14_at_[hidden] <mailto:sg14_at_[hidden]>> wrote:
>
>
> * P3132 Accept attributes with user-defined prefixes
> * P3134 Attribute [[asserts_rvo]]
>
> P3132 aims to make it easier to do tooling through user-defined attributes and has a number of additional upsides.
> P3134 aims to provide guarantees that a function's implementation can make it possible for appropriately written calls to that function to lead to the return value optimization
>
> [...] If you would be so kind as to (a) take a look at them, and ideally (b) provide suggestions / constructive criticism on this list or at the SG14 meeting this week, I would integrate this feedback into the official papers. In particular, I get the impression that the audience should be LEWG but I'd be open to knowing what the groups thinks.
>
>
> Both papers propose core-language features with no library impact, so they should be EWG (in fact, EWGI).
Yes, fully agreed.
> Here's my feedback on P3132: *I think it's mistaken and DOA.*
Yes. See [dcl.attr.grammar] p6:
"For an attribute-token (including an attribute-scoped-token) not specified in this document, the behavior is
implementation-defined; any such attribute-token that is not recognized by the implementation is ignored."
So, the standard already says all you want it to say: It allows unknown attributes,
and requires implementations to ignore them. (Implementations are always allowed
to issue warnings, regardless of what the standard says otherwise, though.)
If you feel a compiler feature such as "don't warn on unknown attributes with prefix X"
would be helpful, then that's a feature request for your compiler, not for the standard.
If I've misunderstood your proposal, please explain to me what your
proposal is, ideally presenting wording changes for [dcl.attr.grammar]
(or wherever else you think amendments need to be made).
Jens
Received on 2024-02-12 17:36:57