diff options
author | Justin Squirek <squirek@adacore.com> | 2024-07-28 21:07:42 +0000 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-08-08 16:28:28 +0200 |
commit | c542075330b8389e712a341a00978ad75af471b6 (patch) | |
tree | c3ffe7aea0874b3b1084d99fc482558b38a11309 | |
parent | 90b3826db603022edcdcea46711d4e4b58aeae12 (diff) | |
download | gcc-c542075330b8389e712a341a00978ad75af471b6.zip gcc-c542075330b8389e712a341a00978ad75af471b6.tar.gz gcc-c542075330b8389e712a341a00978ad75af471b6.tar.bz2 |
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
-rw-r--r-- | gcc/ada/stylesw.adb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/stylesw.adb b/gcc/ada/stylesw.adb index 7600445..6ef8e20 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; |