rsmith added a comment.

In D148700#4401353 <https://reviews.llvm.org/D148700#4401353>, @jyknight wrote:

> Yes, standard attributes aren't supposed to be used for things which affect 
> the type system (although, we certainly have many, already, which do, since 
> we expose most GCC-syntax attributes also as C++-standard attribute syntax!)

The rule that standard attributes don't affect semantics only applies to 
attributes specified by the language standard. There is no expectation that 
vendor attributes avoid such effects. In particular, I'm concerned by this in 
the description of this change:

In D148700 <https://reviews.llvm.org/D148700>, @rsandifo-arm wrote:

> Really, the “only” thing wrong with using standard attributes is that 
> standard attributes cannot affect semantics.

If the only reason for this patch series is an idea that vendor attributes 
using `[[...]]` syntax can't affect program semantics, then I think this change 
is not justified, because vendor attributes using `[[...]]` syntax can and 
usually do affect program semantics. But the documentation change here makes 
the point that using a keyword attribute may be as good idea in cases where you 
would always want compilation to fail on a compiler that doesn't understand the 
annotation, rather than the annotation being ignored (likely with a warning), 
so maybe that's reasonable justification for this direction.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148700/new/

https://reviews.llvm.org/D148700

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to