[Bug c++/110734] Attributes cannot be applied to asm statements
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 19 09:43:19 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110734
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
CC| |hubicka at gcc dot gnu.org
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-07-19
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
But a toplevel asm isn't a "statement" in the sense of parsing. Still
confirmed. Note that I'm not sure we can handle no-reorder for toplevel
asms, IIRC they are not entities in the symtab. I don't remember off head
where they are recorded either ...
Btw, I don't get
t.c:3:1: warning: attributes at the beginning of statement are ignored
[-Wattributes]
3 | [[gnu::no_reorder]]
| ^~~~~~~~~~~~~~~~~~~
unless I wrap your source inside a function. Was your testcase complete?
More information about the Gcc-bugs
mailing list