From patchwork Thu May 25 08:06:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 98843 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp194667vqr; Thu, 25 May 2023 01:10:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6anxeKvawWSKgQDXYL2os7GJVtV78wms79P785e3Ctt+KfTk69JjBZvfKDYNUlbWWDFrkm X-Received: by 2002:aa7:da82:0:b0:50b:c693:70af with SMTP id q2-20020aa7da82000000b0050bc69370afmr3712986eds.2.1685002234882; Thu, 25 May 2023 01:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685002234; cv=none; d=google.com; s=arc-20160816; b=AH/lF0eFvoywjXvbA6gDnYwTcCWzE+Upg5UVlucuKu/Mk3VWOrkABfdidMZtoBv8tr lj2ZsqKQMiefymk2OuKE8ZOxLrTdh1VlXi4YvlSW6pon4xfXDJf22C/tHQ4bKLIlef18 DMwsswznq2EqKBQ9Z3T1++WOZmML5OAEfRRWiKmgcAZ2gv+o8kcaa0QFhPw5ufkAlIvn jufYnXS1Sru3U7AdKSu5koDLG4xV7x6E1d3mEZDGuFmJjssU3Jb49GnNi3xkGbNtP5d6 7bHFlarMgl53IEB+Wetx5VgkeNNBXZ/c6060weqhdnhd3QNF3LJaU/mESq7Oel4GRGT1 xBtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=/4ywTxPZs2sdP3VSgJsq4kK3WSWCZHVJdlUdMi9gjVQ=; b=wQGTcJyIpgcpWWhpU0sx+obbty+/pSrHRsYHVGaZPFZSEWO3hslfLWz3ayEbqhNvzH wXJyUau84rZJX6fk6NtPOSIMN9jOwsX5vNchTVX0H5h0MEg+l8o3ROh2ornA7o+d9VCK twYTWdFLAinOUR86eioMABqXu7lhrry9jX9Fj9uBpZOrg/aAOJM5XVRjgSisgadTWp9f Pyi5zaj5rAsoNFqZVSm3oyLc+G7y+aaV6fLpv2REU8VV2KlGnnDA7KBaIOK168DLQdn3 6s/L3aQcWsQjYI0cGD6jRBxnhJu790MYElieSiPZ6+NE4V+4j0AwV9jOchIW23VtiCEV jlvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=aJYbizJK; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id y2-20020aa7d502000000b00510e6df160csi608498edq.407.2023.05.25.01.10.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 01:10:34 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=aJYbizJK; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 96B08388A41A for ; Thu, 25 May 2023 08:08:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96B08388A41A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685002087; bh=/4ywTxPZs2sdP3VSgJsq4kK3WSWCZHVJdlUdMi9gjVQ=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=aJYbizJKeELpmFHnFO7V2MpJ01LB1pPowqntp1djq5a9Y0Nj3NdWsHAhA6VuRDFTg Wu7T7UO65yeLZes1HdrdiYjiZZQ9b4AeGfERJ3pJDlqcxBsQ0Vdiiyx1BvoN4xx4M0 Dmwh1SXUZ8k7snyAC57JXbQPKiunug5nf/t3AIVU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id D99B03836E9A for ; Thu, 25 May 2023 08:06:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D99B03836E9A Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f60e730bf2so2907675e9.1 for ; Thu, 25 May 2023 01:06:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685001972; x=1687593972; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/4ywTxPZs2sdP3VSgJsq4kK3WSWCZHVJdlUdMi9gjVQ=; b=fJBMVA/JmRx8Miqu6dapEsXDG5WDDmOd2ESyXRGuerEb8wmylbYv+tuNFkNDl5l6rD MbzeQinZlKQeO530FHZPNBs+UhphKvYk96wu3AQs517fcediapwlSvpmDuMMWM8L0W3B PqPQl09H+5eHXzX3VXYWh3aXHwcNiQf4Yq1e3ibooLJmpU+Nls3hzjZL1k9RemSRjwP8 qDJuh7ya9K2i3WDHRN/10gya8J+b+xi9lp9FJB56Q61X/2K5aD1JLYWHrLZm6KycSNAv hpbnMdgyxoSCUISwAER1sZU8OL1n0VUjm4v9NGphbO1n+y7iJpxzCwu7gUU3Uhf3E9lI hEcQ== X-Gm-Message-State: AC+VfDw4gi6GazM4OpdPWW86DSgr2yH09Zlp4cvaciXNLPufuHdWttv4 WtOzErgwR6AJGIl+OQvAAbdHpCL+NkkQjX+SD0hLJw== X-Received: by 2002:a05:600c:2210:b0:3f1:72ec:4009 with SMTP id z16-20020a05600c221000b003f172ec4009mr1429796wml.9.1685001972834; Thu, 25 May 2023 01:06:12 -0700 (PDT) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id y8-20020a7bcd88000000b003f6038faa19sm4718094wmj.19.2023.05.25.01.06.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 01:06:12 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: =?utf-8?q?Marc_Poulhi=C3=A8s?= Subject: [COMMITTED] ada: Fix error message for Aggregate aspect Date: Thu, 25 May 2023 10:06:11 +0200 Message-Id: <20230525080611.1957303-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= From: =?utf-8?q?Marc_Poulhi=C3=A8s?= Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766852903017231428?= X-GMAIL-MSGID: =?utf-8?q?1766852903017231428?= The error message was wrongly using % instead of & in the format string, causing the displayed message to refer to incorrect names in some cases. gcc/ada/ * sem_ch13.adb (Check_Aspect_At_Freeze_Point): fix format string, use existing local Ident. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch13.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 6f9fe738ddd..593e6f8c169 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -11224,8 +11224,8 @@ package body Sem_Ch13 is when Aspect_Aggregate => if Is_Array_Type (Entity (ASN)) then Error_Msg_N - ("aspect% can only be applied to non-array type", - Identifier (ASN)); + ("aspect& can only be applied to non-array type", + Ident); end if; Resolve_Aspect_Aggregate (Entity (ASN), Expression (ASN)); return;