public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114315] New: Attributes should be diagnosed when placed in the middle of declaration specifiers
@ 2024-03-11 23:41 luigighiron at gmail dot com
  0 siblings, 0 replies; only message in thread
From: luigighiron at gmail dot com @ 2024-03-11 23:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114315

            Bug ID: 114315
           Summary: Attributes should be diagnosed when placed in the
                    middle of declaration specifiers
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: luigighiron at gmail dot com
  Target Milestone: ---

GCC will accept programs that use attribute specifiers in the middle of
declaration specifiers, for example:

int[[]]signed main(){}

Attribute specifiers are not allowed inside of the declaration specifiers. I
would expect a warning or an error here, at least when
-pedantic/-pedantic-errors. Here is a link to the grammar of declaration
specifiers: https://eel.is/c++draft/dcl.spec.general#nt:decl-specifier-seq. The
attribute specifier is required to be at the end of the declaration specifiers.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-11 23:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-11 23:41 [Bug c++/114315] New: Attributes should be diagnosed when placed in the middle of declaration specifiers luigighiron at gmail dot com

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).