From patchwork Thu Aug 1 15:17:36 2024 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: 1967889 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; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=VcLIk5Jt; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4WZYHW5m3sz1yZv for ; Fri, 2 Aug 2024 01:47:03 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0C485384AB72 for ; Thu, 1 Aug 2024 15:47:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 162D23860769 for ; Thu, 1 Aug 2024 15:18:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 162D23860769 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 162D23860769 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::432 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722525541; cv=none; b=f6kuHz5fwDw1YSeuWT9S9bAHdVatnRZ7wP6HBpaUpIzoAVFnzqS18z2Twgdlyp/3V8Wd5pVLN5kVp84X/0HJ3mPve0DNeYNcjrjLBu360d8fq11o+E+AsYyNr64gRX1wiPPlRo1CGVEw0CS6Pfm6Gdi9HmbLINI1zvzdAta/uVM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722525541; c=relaxed/simple; bh=Ayrhf3oH7VTl9CxXLn+78yudrnOt+KRxJ1t7pMplxFg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=T8ZY4xkjbTkuJ2WCTerlT2Ycdwlfr6+aA8dFA3bwK2qo/wiKgMaw/tgff8aoHAfzeJZYMlJBN2Cc3Vb27j7tn3M6VojamI2jj1dfRCmN6iz2/LWkquPSUbHDSY+ETWKUatH1PW+1RjhEuVGAwEU8aUEARISwdn9x6JZ62aKl8Cw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-3683178b226so3385430f8f.1 for ; Thu, 01 Aug 2024 08:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1722525514; x=1723130314; 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=oWqYrLfWlCgO1EiU/6bZBQYbcnT/xRrSe82/e7bc0ME=; b=VcLIk5Jtmy2aaGeysBdttphGs3d7JSGi2bt5CBjm/WrkLb6RIPtrTrgUuKDlOyxsUx CQtI6jlR3ilzcfZIIy5KHkC4byNZwZmw4YXRPMMTpov78eK4S8R40gCYhtI9JBLMAxGl soTIRVAvxjmZS/2MrohP5YUiiRklVyk3PHADPzYNUmsOzV6UMhh3tQkMSm6U+XAozANf 0a/Dy05gRBkUV0t5lKvrxzVGSYz4/bHHB4KRxpbo9DJpNTLMgusdXnizrLzoTCF1ZJQx 97pzHpTAcKt++eynp1PlMJnJqpb/OIG4c0xHCEC5Trlqg8Csxyj+2dr/v1vdZKCBunj8 TqSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722525514; x=1723130314; 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=oWqYrLfWlCgO1EiU/6bZBQYbcnT/xRrSe82/e7bc0ME=; b=wgqDAWiqbmid1eaYkgo1KegtdVWQ3vySq7iGX19gMQJ1zJAG3oNX3028ynWoFmGTEU jmlmPtDyayzoGuBC3+NyG4GcMnq4qlZgk1r1gak+LAznCxVWk0OF9ik4RqUFhGXsKA4I hrcdW5xyIRhxLAgtg+AEPwgSnV/h0lIrVpaK0gHqbBvQuqWh8o38T1d5RK0CxBwL6MMi 620d4mrUGjdCa1vgKGKYLeSJ6WTx9J3aj2pCVYuPen3XePiKFe5Ond2YEYQrsXyCV727 P0PTkTaBH/eTQADuZ/NA2XOMVjaAvSbHMkOApVVew23GbnJBGsGllAdoON7D2JAmHRaW BdVw== X-Gm-Message-State: AOJu0Yxih9vYtfIAidDPb60U1ZAbjKoWkixC2lbwknecxWfmEszFeJiw crTMQxEfru58k1l/oFPuLC/TrVFY0ACT13W2KM2bkokviGN2DO5kNcsnWohzd1KOArjv8zhKIgh PVw== X-Google-Smtp-Source: AGHT+IEJ8XAQOPu1GLY+eh74P1MAwU3qSZlQqiSD/aJdRdWnO9Sj7ZDuVBZMXS+rL4dNCWEytx6SNg== X-Received: by 2002:a5d:4003:0:b0:368:4edc:611e with SMTP id ffacd0b85a97d-36bbc0db7c9mr130135f8f.14.1722525513646; Thu, 01 Aug 2024 08:18:33 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:b6aa:4751:9ea1:da1e]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36857fdesm20065995f8f.75.2024.08.01.08.18.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 08:18:33 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED 28/30] ada: Accept duplicate SPARK_Mode pragmas in configuration files Date: Thu, 1 Aug 2024 17:17:36 +0200 Message-ID: <20240801151738.400796-28-poulhies@adacore.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801151738.400796-1-poulhies@adacore.com> References: <20240801151738.400796-1-poulhies@adacore.com> 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 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 From: Piotr Trojanek For consistency, we now accept duplicate SPARK_Mode pragmas in configuration files just like we accept other duplicate pragas there. gcc/ada/ * sem_prag.adb (Analyze_Pragma): Don't check for duplicate SPARK_Mode pragmas in configuration files. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 52d63cf4492..e41fb2f8618 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -24758,14 +24758,6 @@ package body Sem_Prag is if No (Context) then Check_Valid_Configuration_Pragma; - - if Present (SPARK_Mode_Pragma) then - Duplication_Error - (Prag => N, - Prev => SPARK_Mode_Pragma); - raise Pragma_Exit; - end if; - Set_SPARK_Context; -- The pragma acts as a configuration pragma in a compilation unit