https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81756

--- Comment #3 from Joseph S. Myers <jsm28 at gcc dot gnu.org> ---
This sort of "???" comment about existing practice means that some past change
(in this case, the one adding support for [[]] attributes) was aiming to avoid
perturbing how the compiler behaved for constructs that were not the subject of
the change (in this case, __attribute__).

Silently ignoring attributes is not good, but it would be important to diagnose
cases where they cannot be respected, such as when the attributes appear after
the type was defined and are not consistent with the attributes in effect when
it was defined.

The documentation you refer to is intended to mean that "struct
__attribute__((...)) foo { ... }" is preferred to "struct foo { ... }
__attribute__((...))", not to suggest that the attributes should be used in a
declaration that does not define the tagged type.

Reply via email to