| Message ID | 20250911091904.1505690-24-poulhies@adacore.com |
|---|---|
| State | Committed |
| Commit | b69dbe06f91248457e7b532d5c8fffc4f73b1f76 |
| Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 184F33858419 for <patchwork@sourceware.org>; Thu, 11 Sep 2025 09:43:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 184F33858419 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=UQN/zGZ7 X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 12A433858419 for <gcc-patches@gcc.gnu.org>; Thu, 11 Sep 2025 09:19:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 12A433858419 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 12A433858419 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757582376; cv=none; b=QyCRocF6Ehk+slh0vUXdnB0x4nnq0AXi3KJPxh84kvjDESf1qInY+bN2YKnBL1gVX3PD0DYnkOUQ06b7fD6oyX2kMyx+Sgyi4ht3JbxyqKm+T6Zro4VUweGNR9wrnUqAoe2F/BHWF0lfI7s52wALQexK/UQD4ztjojk8MmmWkOo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757582376; c=relaxed/simple; bh=NE/mEc0bp+sLRJrKNK71IDfIMo5/CvlozQ8cPskqlCA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=m2ngJ/93HxsD8hDPXYYIMGLik8mHW6b7jqvQEyOiBgyelCqLOkb3p59pJUOaLbu9Cn08KLmqqXT3N3Mh2AMw5Dj5bsmKcIoh7EYOJTHjaONn/lJ8mRUbWjwfn621H1SD8ZZvviJqGDg6Xx/m8Ix4ZpdmR7utkRaULPwEjFPbyes= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 12A433858419 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3e46fac8421so473250f8f.2 for <gcc-patches@gcc.gnu.org>; Thu, 11 Sep 2025 02:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1757582375; x=1758187175; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=81/LNXW775XUwASdFxzolRHnYpIlobfYC6ZDXaFemsA=; b=UQN/zGZ7hVUeM6H0SexXDJeFu9i92DZg8nBEEnIh2kJr9ue1W/MSCbAMHYaafbupBT 93Ga/zzYgxveF/FMTKe5n+WhVyO/E/HFnPSx23iEwrhmjLhibzxYwgmmo5GqLYvS0zeL sd8fC+gEQ4Ip9kI0U3lcD/CiANZ76ISNTJz82ebbvrf3BHyvKV2siWeZcRYM6Jbbpf4H lwuNoIFFua3U9hUYncFzJzCVA7kpljibH9vuROlcVNyvFJ915Qhq9Ycepo7rL1q0kKY9 iMdERsdDl4jAsHGKAfGX2UzW9ADXX5BvQt/Rc1Hh7X2yWh+KgD+H2AQ8G+QyWAFG25p+ ERSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757582375; x=1758187175; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=81/LNXW775XUwASdFxzolRHnYpIlobfYC6ZDXaFemsA=; b=YKYIh4cc8XIRqElovgqsqCA9NveaLUplhPIHPtuvqftHZv5zLYlOpiS0M/uEot4HyV AJ6h1p/SXhNqdC8MREJ+7kq61oRllOVd5fAsfaY3aStcpHY3KQAZufLhmRuvncFPUNJH +cz+CrNjgYwVDxmokZuS2vcyruRCyIA6ccNwVbCqohZzeGTDFbdC+6XMDX9jHRJAdSVk rXg5zp+UGMFwoVRxZg0/fVa6Q7gvChKJ1jbWX2wForgHq3pTrAlP9chLcr5/iQLnyq8p 76iI4agj/4wmEhk3K6+ce9R9LwmMO2qSQWoiZuzZdqLER6TNlWn11HWsG8VBfzDgWEhd EHGw== X-Gm-Message-State: AOJu0Yzpl1Vkp1vUNoAiZw9Fwp1NyN89KaWYjWt0pUQmwIZxHFINnT5F GAdF7VE9/2qHpd1lIJwEXwVOBe2goVDuEy9wYbPFpiqU5XnmpJW7O+rDWfqJzJ6T+/tgWUlFbuk 4cGM= X-Gm-Gg: ASbGncsejYZmfqP0PQptaqNYpO8bd2Vav8wfd+ZuzuKDqB3rKdULf/bbQjhOjjwVY5l MCU3irf5LsXWfbY9fRPr4rLTo+mJLAme1P3HsufxMJOa2Bf1Zt8AlVcIcH8BFqeHsIMe5euqHDs 1jGL7rdfI+DQT7I42yIjwEgiTaZKAdTE+dlF5PQX/FihL739aWKOni/9jYuTw86KNScZmbMVTUZ DeLlOTRhubMUvYzt5Ra1UuLgu0krTaZ6R1FXlnelUFnmtJbh+DZMOlvz9t2kPZTjf6th19Yyc62 0BRcd9z5H38oPgi3NJBxVDShH2AdcvISBTY+xkXjyNt6lYiTOFqR1lY2fwNh+IxgtDhOgUNB3w/ 3kczZAbvS78pPRmYe5NK7IW8zP9I251fzQa+KDEIqYQxflicIuVmG15VnGGXrzH0mS47ig1oJtl YZUim44fDAoTUbA5BC7u97+NsKyGqfIXsVlysXoeqUKm+bzn+b X-Google-Smtp-Source: AGHT+IGDF7KsEcy+t2zX5vr8r0mOi7isyCswbAaZExNOpHEXEFUZ1JA4Q2tQMF11rHoT4z7EcTq4ZA== X-Received: by 2002:a5d:588c:0:b0:3e2:9a5a:1f38 with SMTP id ffacd0b85a97d-3e64c692464mr12948180f8f.50.1757582374692; Thu, 11 Sep 2025 02:19:34 -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 ffacd0b85a97d-3e7607cd27dsm1649971f8f.41.2025.09.11.02.19.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Sep 2025 02:19:34 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Viljar Indus <indus@adacore.com> Subject: [COMMITTED 24/31] ada: Create a ghost region for pragma annotate Date: Thu, 11 Sep 2025 11:18:56 +0200 Message-ID: <20250911091904.1505690-24-poulhies@adacore.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250911091904.1505690-1-poulhies@adacore.com> References: <20250911091904.1505690-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
| Series |
[COMMITTED,01/31] ada: Disable new warning for composite equality ops that can raise Program_Error
|
|
Commit Message
Marc Poulhiès
Sept. 11, 2025, 9:18 a.m. UTC
From: Viljar Indus <indus@adacore.com>
Create a ghost region for pragma annotate so that we are able to analyze
the entity references correctly inside the pragma.
gcc/ada/ChangeLog:
* sem_prag.adb: Create a ghost region for pragma annotate before
analyzing its arguments.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_prag.adb | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 753ccda66756..661d4401d7a2 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -14149,6 +14149,9 @@ package body Sem_Prag is Expr : Node_Id; Nam_Arg : Node_Id; + Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config; + -- Save the Ghost-related attributes to restore on exit + -------------------------- -- Inferred_String_Type -- -------------------------- @@ -14226,6 +14229,10 @@ package body Sem_Prag is end if; end if; + -- Set the ghost mode before analyzing all of the arguments + + Set_Ghost_Mode (N); + -- Continue the processing with last argument removed for now Check_Arg_Is_Identifier (Arg1); @@ -14271,6 +14278,8 @@ package body Sem_Prag is Next (Arg); end loop; end if; + + Restore_Ghost_Region (Saved_Ghost_Config); end Annotate; -------------------------------------------------