From: Justin Squirek <squi...@adacore.com> 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; -- 2.45.2