[Bug c/101682] gcc incorrectly rejects C2x attributes after declaration-specifiers

2023-02-14 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101682 Sam James changed: What|Removed |Added CC||sam at gentoo dot org --- Comment #7 from

[Bug c/101682] gcc incorrectly rejects C2x attributes after declaration-specifiers

2021-07-30 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101682 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment

[Bug c/101682] gcc incorrectly rejects C2x attributes after declaration-specifiers

2021-07-30 Thread eggert at gnu dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101682 Paul Eggert changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/101682] gcc incorrectly rejects C2x attributes after declaration-specifiers

2021-07-30 Thread joseph at codesourcery dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101682 --- Comment #4 from joseph at codesourcery dot com --- On Thu, 29 Jul 2021, eggert at gnu dot org via Gcc-bugs wrote: > The grammar at the start of section 6.7 of the current C2x draft (N2596) says > that attribute specifiers may appear either

[Bug c/101682] gcc incorrectly rejects C2x attributes after declaration-specifiers

2021-07-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101682 --- Comment #3 from Andrew Pinski --- (In reply to Paul Eggert from comment #2) > Clang's warnings are not a problem here, because in clang 12.0.0 (the > current release) __has_c_attribute(nodiscard) is false, so code like this > works: I was

[Bug c/101682] gcc incorrectly rejects C2x attributes after declaration-specifiers

2021-07-29 Thread eggert at gnu dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101682 --- Comment #2 from Paul Eggert --- Clang's warnings are not a problem here, because in clang 12.0.0 (the current release) __has_c_attribute(nodiscard) is false, so code like this works: #ifndef __has_c_attribute # define __has_c_attribute(x)

[Bug c/101682] gcc incorrectly rejects C2x attributes after declaration-specifiers

2021-07-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101682 --- Comment #1 from Andrew Pinski --- clang rejects/warnings similar to gcc: :2:8: error: an attribute list cannot appear here extern [[nodiscard]] int f (void); ^ :3:14: error: 'nodiscard' attribute cannot be applied to