From patchwork Thu Aug 8 14:29:44 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: 1970584 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=aNXyThAC; 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 4WfqHj0QlTz1ybS for ; Fri, 9 Aug 2024 00:32:01 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4B19B3865C26 for ; Thu, 8 Aug 2024 14:31:59 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id AC9F2386183E for ; Thu, 8 Aug 2024 14:30:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AC9F2386183E 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 AC9F2386183E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723127438; cv=none; b=IiUqT25PDgqr9CWLBzPNOOHQ+YsPNlBwtz8h9qRtUJ//SWah8Iu4P8FByuW1blF90xqEmrwMVbOU8s1HJYBrGXb9jUZZaiowwRe+TeFLOYQS7uKkHjzZX2fRCBTql04mmwN72b8EpK616MV/IkJHXkvofVyRS25YTMQk63WBAko= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723127438; c=relaxed/simple; bh=z99rgvLVsrb9aZQDuko0qOIufk1LrW4xEi2BtXaG2l8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=itgQEkRjc6sp/4Y4XsIQi+q09F9c2ILdT0wHjyYP0juDmsEbuLqYUewNpPV/xnMFtq7fxwv4Vvu+IFSTk9xfZlGwGNM/+xKKMP6wxU7Kbrfjtd5KLP3WBPrkvZqRjv8vhEjzWU0U+ubC58T8iT6wvjrQaOW/xfTdvPiUM4Nho6s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4281c164408so7464275e9.1 for ; Thu, 08 Aug 2024 07:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1723127435; x=1723732235; 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=8sAQJaehM5X3Pj5bKzchZP6C9IbjjVDHJvkC8s6AuFo=; b=aNXyThACpfaJK8WW2dMKHRbVu+4UyIOq2VKrfQ0b1vWUVD1JAHuTxaTu5C7tGUYYB9 rI+vRxSGC0S8ieJ472G9a40Dg06VFulzYiZTdlmIPHHcR1rWkzzBDnytH1Exg7c5TJD/ 9+9n+bi3+xJHqQ/fvPDHWaM21mC1pTtUH2Fbn7n65M3VNi1EKYL/G/OzLf4/K3CNERx4 evv4e/TCZn2U53jn+KWzV80+dKFdaLwODTWVfASdYAuSUYY6oDhUku2RAbzS02sZnch9 UwPKorRVlwWQqFbyqnrAfuwkd/NGROSDh+ImeEG7apBIHZb5o79EvY1YZQjvCQVCO8XE CcZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723127435; x=1723732235; 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=8sAQJaehM5X3Pj5bKzchZP6C9IbjjVDHJvkC8s6AuFo=; b=EuAxRI/nk8z/R4TcLWzQjrzdFtVGWhtHyjf+KX3otj2C/2eRRZWeza2R25M1dbPcIt dqWj0ZuolWsZTAr6hfPq1SjnZvDmFRYScFilk3kaIXN5zUK9bL50gRagvw0c1gi1SqiT A9aNbQHPlYo551mthtGriXJAhfdHOScllnpZR9+sX53LDAvMlwTilHoEjvfHJebpkKBp cJKt5lvqrhXUBodf3tcghqjVrZK9430I+d/i806WOPogWVnSkRCmd5z+IDkpj61Smj01 b1almu5xCY0sZWl1GFmrmaY3xkBp+PBGRC0d7DJ654dsNk3GaP2SmLAWY3AyJHUhjR4v 12nQ== X-Gm-Message-State: AOJu0YzW5KBvIfy0fFXtYjJ8oHePfg7je405BcXsgN9bUDulz+zx7uj0 AtM+600DwqYktD3pOzXEroxF6hhFoM5cZjQf0/U0yhGiQohXL1PioXI8G7mywYjfwbUTqum7TVj Sug== X-Google-Smtp-Source: AGHT+IF9Zfg5lKdMH3jzLbkkXw+LAb4h8anpYCHi834yWdIWbCp2xv1/PEAds3Jqg34cVN7AoE7TCw== X-Received: by 2002:a05:600c:458a:b0:428:f41:d467 with SMTP id 5b1f17b1804b1-4290aeb3a84mr15243855e9.10.1723127434805; Thu, 08 Aug 2024 07:30: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 5b1f17b1804b1-4290c72d6c8sm25992015e9.9.2024.08.08.07.30.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Aug 2024 07:30:34 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Justin Squirek Subject: [COMMITTED 2/6] ada: Spurious maximum nesting level warnings Date: Thu, 8 Aug 2024 16:29:44 +0200 Message-ID: <20240808142948.807190-2-poulhies@adacore.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240808142948.807190-1-poulhies@adacore.com> References: <20240808142948.807190-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: Justin Squirek This patch fixes an issue in the compiler whereby disabling style checks via pragma Style_Checks ("-L") resulted in the minimum nesting level being zero but the style still being enabled - leading to spurious maximum nesting level exceeded warnings. gcc/ada/ * stylesw.adb (Set_Style_Check_Options): Disable max nesting level when unspecified Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/stylesw.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/ada/stylesw.adb b/gcc/ada/stylesw.adb index 76004455b10..6ef8e205e96 100644 --- a/gcc/ada/stylesw.adb +++ b/gcc/ada/stylesw.adb @@ -537,7 +537,8 @@ package body Stylesw is Style_Check_Layout := False; when 'L' => - Style_Max_Nesting_Level := 0; + Style_Max_Nesting_Level := 0; + Style_Check_Max_Nesting_Level := False; when 'm' => Style_Check_Max_Line_Length := False;