From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6715B3858C62; Fri, 1 Dec 2023 06:22:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6715B3858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701411766; bh=RLzN14gXoKkUB+xDSjJ6bRHUalVqzgGUz3jOQPj9AFc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ur72pLz56+F2kfRSX2iqxSjN9/dHYpXd2XeuT1N4fFHqzFW/lJDkTssvK5/zmL67/ tFXt0iL0qm4s2CdzWW5cX+WevhX3bGhXOeQ3q1gK8eN4+l+NFXonbzIrk10FndGNLA Ymj4HW7amC7fOxKx3KrmGXxbvht9ubEuT9pQCAv4= From: "tanksherman27 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110734] Attributes cannot be applied to asm declaration Date: Fri, 01 Dec 2023 06:22:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: diagnostic, inline-asm X-Bugzilla-Severity: enhancement X-Bugzilla-Who: tanksherman27 at gmail dot com X-Bugzilla-Status: NEW 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: Message-ID: In-Reply-To: References: 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=3D110734 --- Comment #17 from Julian Waters --- Looking at the source of the C++ parser it doesn't seem like asm (""); is considered a statement but rather is correctly parsed as a declaration, see cp_parser_block_declaration and cp_parser_declaration_statement. The no_reo= rder attribute is just a demonstration, I am aware it is not meant for asm declarations, rather the error is in how the error message is formed, eg er= ror: expected primary-expression before 'asm' instead of error: expected primary-expression before 'asm'=