Currently we define away all attributes with -D __attribute__(x)=
in config.h
.
Some attributes like nodiscard
and deprecated
can safely be ignored, but others like packed
, mode
, and constructor
have important semantics.
Since attributes are already accepted for C2X (n2335), we should at least be parsing them, ignoring the ones that don't change semantics, and producing an error for the ones that do.
n2335 has this to say about ignoring attributes:
Attributes specified by this document can be parsed but ignored by an implementation without changing the semantics of a correct program; the same is not true for attributes not specified by this document.
The currently accepted attributes for C2X are nodiscard
, maybe_unused
, and deprecated
, which can all be ignored.
Michael Forney referenced this ticket in commit 731e7a2.
Michael Forney referenced this ticket in commit 591853a.
Michael Forney referenced this ticket in commit 7c4217e.