https://gcc.gnu.org/g:c542075330b8389e712a341a00978ad75af471b6
commit r15-2829-gc542075330b8389e712a341a00978ad75af471b6 Author: Justin Squirek <squi...@adacore.com> Date: Sun Jul 28 21:07:42 2024 +0000 ada: Spurious maximum nesting level warnings 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 Diff: --- 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 76004455b104..6ef8e205e968 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;