From patchwork Wed Jun 12 17:20:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 1947048 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=lZgM8tmS; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VzslF2KC3z20Pb for ; Thu, 13 Jun 2024 03:21:13 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE0B03882648 for ; Wed, 12 Jun 2024 17:21:10 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by sourceware.org (Postfix) with ESMTPS id 148543882103 for ; Wed, 12 Jun 2024 17:20:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 148543882103 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=linux.intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 148543882103 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.16 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718212847; cv=none; b=US38ZDAj+wCwQNklxTTJz6S0lJO++x97I6uhaqyH2S0oY8V6TgS1YEExCnbcXlDK8eae7ADVUKN7wUDVC13iCPWJIj8axZDpakeKPbyiw+72tD4iszMvNK7ZnS4QLWU2fPqLOvz1+HpQT4V0Uy0b6gwEXyMjBGmGFFhXtgLbB/M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718212847; c=relaxed/simple; bh=SuR8zkg/Mh7MxwgzrHXWIobVWVDuXT853O6YUmE5KXA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=cKG3bdYeYiQDtUhWW/pUFwDEJbHgTt745jZqObV5yV4wH7aBqd8Rxw8UD0fqjXuFkugp/FXEvv2tCQ7abEPeFXgD3ih4dS1vIj3k25RvgoAuL45GO3HQhQVYFE5mVEsoA1aR7UqZZ/zf4lTnt30Rt/Yvt69SojOw70Dd5STs9YQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718212844; x=1749748844; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SuR8zkg/Mh7MxwgzrHXWIobVWVDuXT853O6YUmE5KXA=; b=lZgM8tmSzulpLkFuQl1qMnH8vK5fzOnKkJek+Jx8prmdngOHZuyjjpvb gjaIUmdsINg+e+7QDKz1SlPcB7HhbCSlT1YQdKWvzPBCSf1+TLBEcmaKr 3TRjOI3ckLY8MDZyNtlrvvkWoAP9bArmbdf3coXRGt9xtxJcasv/U2r3Q /tcbb8aKzJLUXivm18irz5HJW6F+4ughYqlvEKdmh6NtxKR4y8kCFNwUJ eqGRMMcjciDyoLUmvidnbY8XtcNDn+YhxZtZhBgP3fGY9Wb1mjG665qH2 1MTQu+9nUmdqm8F3Ec4oy/dpGBOpxg9nkyBtdeS4S747TY6Hg34VAUa7Y A==; X-CSE-ConnectionGUID: 4UPTxItHQM+w5nF3fk0Rwg== X-CSE-MsgGUID: ckFU98sFTAizbyJz1f0IAg== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="12039723" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="12039723" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 10:20:39 -0700 X-CSE-ConnectionGUID: 3qpERiQpS8mhQAOWO1tiUg== X-CSE-MsgGUID: BFiBBB0zQKGyc2Qydd08Mg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="44796876" Received: from tassilo.jf.intel.com ([10.54.38.190]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 10:20:39 -0700 From: Andi Kleen To: gcc-patches@gcc.gnu.org Cc: jason@redhat.com, Andi Kleen Subject: [PATCH 3/3] Fix error message Date: Wed, 12 Jun 2024 10:20:31 -0700 Message-ID: <20240612172031.3827584-3-ak@linux.intel.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240612172031.3827584-1-ak@linux.intel.com> References: <20240612172031.3827584-1-ak@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org gcc/cp/ChangeLog: * parser.cc (cp_parser_asm_string_expression): Use correct error message. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/constexpr-asm-3.C: Adjust for new message. --- gcc/cp/parser.cc | 2 +- gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index adc4e6fc1aee..01a19080d6c7 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -22863,7 +22863,7 @@ cp_parser_asm_string_expression (cp_parser *parser) else if (!cp_parser_is_string_literal (tok)) { error_at (tok->location, - "expected string-literal or constexpr in brackets"); + "expected string-literal or constexpr in parentheses"); return error_mark_node; } return cp_parser_string_literal (parser, false, false); diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C index ef8a35a0b3ba..0cf8940e109c 100644 --- a/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C +++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C @@ -26,7 +26,7 @@ constexpr std::string_view genclobber () void f() { int a; - asm(genfoo () : /* { dg-error "expected string-literal or constexpr in brackets" } */ + asm(genfoo () : /* { dg-error "expected string-literal or constexpr in parentheses" } */ genoutput() (a) : geninput() (1) : genclobber());