Message ID | 20240516092606.41242-27-poulhies@adacore.com |
---|---|
State | New |
Headers | show
Return-Path: <gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org> 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=iGyG8S7H; 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 4Vg4ft4gS5z20dQ for <incoming@patchwork.ozlabs.org>; Thu, 16 May 2024 19:34:14 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E62DA384640C for <incoming@patchwork.ozlabs.org>; Thu, 16 May 2024 09:34:12 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id D25DB3846077 for <gcc-patches@gcc.gnu.org>; Thu, 16 May 2024 09:26:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D25DB3846077 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 D25DB3846077 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715851599; cv=none; b=v7thic7GFsCxUs5M0wSJIx96WZME//uceIN15sjC+wBbP2QradwSsL3QMm82BJKuV4OgX0K5WNO99NO0svoinEZnWjr/4AGFj+M06SpVEMxvM51782q1Yq9KhqZBTdZ2Fl8PFC8h7mP13XrtKRk4ZFguvuSDZB2DNeNwkix0Jb0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715851599; c=relaxed/simple; bh=/5/kyzc9fKX0BwwNYSSM2mKGAkhePV4Tc7GUWfvgU88=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=UH9DUxYveCAGhFksrVHmcIKDX+ko67mefYGVUSQGNZAZZDd9NoW0pfvs9n9quy+4/84Cv/jQ2zNFrrQ+ZTzxn4rm6WScmsQfd5CR20tW3bNMFw08Oed7ADCEBYNe5wiPod4zu/S0YLfBa0JvEFo/msuhSfe4rPwcdFbsQTs31dE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-420180b59b7so27862615e9.0 for <gcc-patches@gcc.gnu.org>; Thu, 16 May 2024 02:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1715851589; x=1716456389; 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=gFHVrYYmCsdtTXw6k9PzkFN0hNG2TM0dUW9uYDU9AHk=; b=iGyG8S7H3Zxe/vSjlA5ygchRWWVm8mFSIQmCPgL1q9iyJeStmNxx81Lo7RO+5p1SHs c+q25x502FVILnG5Q3E71OgnbanAUdHf8kQRtuEjRZeZtLF5sJ1JP0nhbO3RfhUiUGmw bdkf362vWYF+DSyekdbTXOFQc07p4qblmexq4iUT8r+8UalWzZM2xzY8Z25EbxqRxHdR rvkdeX7F1UyKszWbVu3V4s9RVzALgCtYgzh1i64PUdpnmwGnbavmkSQnYvp+BisbGOtX yKtrLgQhNFKaAomoRHd9Wd30Les/rfMAGuC7GSQGotna70pQPSVHK4QVJzBEXBc+0qhf Zwfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715851589; x=1716456389; 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=gFHVrYYmCsdtTXw6k9PzkFN0hNG2TM0dUW9uYDU9AHk=; b=QIYFKVP+5WYgxv1lS/iCw9vwDZ+M4Ai5F8td5RQFiJtG6gr7mTLyEVSLRr4wmDpJJ9 FOUwsu+cTH2NZahfILy2WBQ1rMWioc2y23U8kMbfcnPLnPBrg6DEyx0GTKlZQph0E5eb eWwf9dxYpLvfoVgngWuXFAlsZ3iANSrvwUbgONCBLys4JhFyIPzYtQhX5cd69UzvRjbM FSEwfNIVrWBK+BkmjECXNwhC+bTKiRrEhOWjmrn45IKNQsjfh4SBE/1INfyENfiX90ww +e7sVb2wF773R35GWRW/2hJXhZDao1Ogvw82oUqj96O7o7zmRix5Q9WRPYQSchbmHwbH S7Uw== X-Gm-Message-State: AOJu0YwbtTf1mM7QVCX+R2Zgt2aPLC3xhEX3ghWwbOYoH4VG6kmvtqBj mWYacWsa345YQZLuiHvmgW8/34L61Y6yEuqDS9ccuOHxgYpODZex5RgT5omDNl2vnqdcVTwM3yM = X-Google-Smtp-Source: AGHT+IEcrBr3HxQpie61b3Zx+vGKBTEqoqgh3G0vXHiStuKVS/1UrK/aJB1Sd7/m/QggHiPP9rO78Q== X-Received: by 2002:a05:600c:1389:b0:41f:f053:edb4 with SMTP id 5b1f17b1804b1-41ff053ef30mr131658005e9.23.1715851589560; Thu, 16 May 2024 02:26:29 -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 5b1f17b1804b1-41fd10cf8besm135802635e9.1.2024.05.16.02.26.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 02:26:29 -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 27/35] ada: Avoid checking parameters of protected procedures Date: Thu, 16 May 2024 11:25:56 +0200 Message-ID: <20240516092606.41242-27-poulhies@adacore.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240516092606.41242-1-poulhies@adacore.com> References: <20240516092606.41242-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 <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+incoming=patchwork.ozlabs.org@gcc.gnu.org |
Series |
[COMMITTED,01/35] ada: Fix docs and comments about pragmas for Boolean-valued aspects
|
expand
|
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 0a8030cb923..ca40b5479e0 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -4971,8 +4971,11 @@ package body Sem_Ch6 is -- Skip the check for subprograms generated for protected subprograms -- because it is also done for the protected subprograms themselves. - elsif Present (Spec_Id) - and then Present (Protected_Subprogram (Spec_Id)) + elsif (Present (Spec_Id) + and then Present (Protected_Subprogram (Spec_Id))) + or else + (Acts_As_Spec (N) + and then Present (Protected_Subprogram (Body_Id))) then null;
From: Viljar Indus <indus@adacore.com> The compiler triggers warnings on generated protected procedures if the procedure does not have an explicit spec. Instead check if the body was created for a protected procedure if the spec is not present. gcc/ada/ * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the spec is not present for a subprogram body then check if the body definiton was created for a protected procedure. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch6.adb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)