public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/102397] New: Documentation of attribute syntax does not discuss C++11 / C23 attribute syntax @ 2021-09-18 11:06 dangelog at gmail dot com 2021-09-18 15:03 ` [Bug c++/102397] " redi at gcc dot gnu.org 2024-01-19 2:52 ` sandra at gcc dot gnu.org 0 siblings, 2 replies; 3+ messages in thread From: dangelog at gmail dot com @ 2021-09-18 11:06 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102397 Bug ID: 102397 Summary: Documentation of attribute syntax does not discuss C++11 / C23 attribute syntax Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dangelog at gmail dot com Target Milestone: --- Hi, The available documentation for attributes syntax https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html#Attribute-Syntax does not mention at all the possibility that in C++11 (and, I imagine, in C23) one can specify any GCC-specific attribute using a [[gnu::attribute]] attribute specifier, and not only the GCC-specific __attribute__((attribute)) syntax. I think it would be worth mentioning in there that this is actually OK and fully supported. ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/102397] Documentation of attribute syntax does not discuss C++11 / C23 attribute syntax 2021-09-18 11:06 [Bug c++/102397] New: Documentation of attribute syntax does not discuss C++11 / C23 attribute syntax dangelog at gmail dot com @ 2021-09-18 15:03 ` redi at gcc dot gnu.org 2024-01-19 2:52 ` sandra at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: redi at gcc dot gnu.org @ 2021-09-18 15:03 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102397 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2021-09-18 Ever confirmed|0 |1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/102397] Documentation of attribute syntax does not discuss C++11 / C23 attribute syntax 2021-09-18 11:06 [Bug c++/102397] New: Documentation of attribute syntax does not discuss C++11 / C23 attribute syntax dangelog at gmail dot com 2021-09-18 15:03 ` [Bug c++/102397] " redi at gcc dot gnu.org @ 2024-01-19 2:52 ` sandra at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: sandra at gcc dot gnu.org @ 2024-01-19 2:52 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102397 sandra at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sandra at gcc dot gnu.org --- Comment #1 from sandra at gcc dot gnu.org --- I committed a patch a few months ago to say that the new C++/C standard attribute syntax is supported with a gnu:: prefix, so at least the originally-reported problem has already been fixed. However, all the examples still use the old syntax. Given that there is an awful lot of legacy code using the old syntax already out there, examples are useful in helping people grok what it means, but at some point we probably want to encourage people to use the new syntax in new code for all the usual reasons why it's better to do things in a standard way, and use it also as the primary form for documentation. OTOH, I don't think we're quite there yet. Presently the manual describes C23 support as "experimental and incomplete" and says the default C language dialect is -std=gnu17. My sense is that it's not appropriate to tell users to make the switch until GCC's default dialect is advanced to something based on C23. So I'm going to leave this issue open for now instead of closing it as fixed, as a reminder that there is still more work to be done here a little farther down the road. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-19 2:52 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-09-18 11:06 [Bug c++/102397] New: Documentation of attribute syntax does not discuss C++11 / C23 attribute syntax dangelog at gmail dot com 2021-09-18 15:03 ` [Bug c++/102397] " redi at gcc dot gnu.org 2024-01-19 2:52 ` sandra at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).