]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Spurious maximum nesting level warnings
authorJustin Squirek <squirek@adacore.com>
Sun, 28 Jul 2024 21:07:42 +0000 (21:07 +0000)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 8 Aug 2024 14:28:28 +0000 (16:28 +0200)
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

gcc/ada/stylesw.adb

index 76004455b104c735e8d5d8f0e434835295a38ddd..6ef8e205e968f2d884645c38d1101ead4bc2eb1c 100644 (file)
@@ -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;