https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122483
--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Alex Coplan from comment #12) > (In reply to H.J. Lu from comment #10) > > (In reply to Andrew Pinski from comment #9) > > > (In reply to H.J. Lu from comment #7) > > > > > > > > It is done on purpose for C++. Otherwise, we get > > > > > > > > g++.dg/tm/pr46270.C > > > > g++.dg/tm/pr46567.C > > > > g++.dg/tm/pr47340.C > > > > g++.dg/tm/unsafe2.C > > > > > > > > See > > > > > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122428 > > > > > > That does not mean it can't be different for different attributes on the > > > types :). > > > > But C++ front-end does this for all type-affecting attributes. There are > > no exceptions. > > H.J., I noticed that the nocf_check definition has the affects_type_identity > field set to true. gcc/c-family/c-attribs.cc has: > > { "nocf_check", 0, 0, false, true, true, true, > handle_nocf_check_attribute, NULL }, > > where the field before handle_nocf_check_attribute is affects_type_identity. > > I was wondering why this is the case / whether it is intentional? ISTM that: > It is intentional.
