https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54265
sandra at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-11-23 CC| |sandra at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from sandra at gcc dot gnu.org --- The language has been changed a little bit since this PR was filed, but the problem still exists on trunk. The text that "the former syntax is preferred" originated in r115086, a patch to overhaul the implementation of the "visibility" attribute in C++. The "visibility" attribute for C++ classes has the restriction that it has to appear before the body of the class. But I didn't see any discussion or justification about why this should be a general preference for all attributes in the mail thread for that patch, which starts here: https://gcc.gnu.org/ml/gcc-patches/2006-06/msg01302.html Prior to that the text just presented both possible locations for type attributes without saying one was better than the other. I think the best fix for this is to remove the problematic recommendation again. The docs for the "visibility" type attribute do explicitly say that it has to go before the class body, and I think that's adequate.