From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CF32F3858425; Mon, 11 Mar 2024 23:41:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF32F3858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710200489; bh=E7KdCNbwCk+4/HScTDoa62VqWVHmo+RjV8iGOJZ4Axs=; h=From:To:Subject:Date:From; b=WvtOph1JZ4c7wxBwJrMIaJU8Gh2z8sHG+nJgbWvOCuIZJyC5LtErkDr59gPyAn2jZ bRHqOLx6eyUQsw8wZCYkYYnag2yUchxvl0cwfsMEVtxQoAb/h1jimYYAPWcZ3WCMDg KdADjUi9kXRg8bYBv9oj46hWxSLLsG1ARpm4dTqA= From: "luigighiron at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114315] New: Attributes should be diagnosed when placed in the middle of declaration specifiers Date: Mon, 11 Mar 2024 23:41:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: luigighiron at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114315 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 specifi= ers.=