]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Fix bogus style check failure with pragma Style_Checks (Off)
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Aug 2019 08:08:06 +0000 (08:08 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Aug 2019 08:08:06 +0000 (08:08 +0000)
This fixes a bogus style check failure for long lines in rare cases
where the compiler is invoked, with a -gnatyX switch where X is neither
'm' nor 'M', on a unit which contains "with" clauses for other units
that contain a pragma Style_Checks (Off).

2019-08-13  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* sem.adb (Do_Analyze): Recompute Style_Check_Max_Line_Length
after restoring Style_Max_Line_Length.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274352 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/sem.adb

index 162d027ce73b69d517eccfe111cf47703ff90ce2..a34c4eec137a3eb626f4c5addaa653af82797ce0 100644 (file)
@@ -1,3 +1,8 @@
+2019-08-13  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * sem.adb (Do_Analyze): Recompute Style_Check_Max_Line_Length
+       after restoring Style_Max_Line_Length.
+
 2019-08-13  Arnaud Charlet  <charlet@adacore.com>
 
        * sem_ch13.adb (Check_Iterator_Functions): Protect against
index 2f8f6a4eee490618cb3bd0799ec57a68ca27576d..9b6b33535f97ab78377843ef612907952854cf8f 100644 (file)
@@ -1395,6 +1395,7 @@ package body Sem is
          Restore_Scope_Stack  (List);
          Restore_Ghost_Region (Saved_GM, Saved_IGR);
          Style_Max_Line_Length := Saved_ML;
+         Style_Check_Max_Line_Length := Style_Max_Line_Length /= 0;
       end Do_Analyze;
 
       --  Local variables