aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-08-13 08:08:06 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-13 08:08:06 +0000
commit063907abadf6ee9ffe4d60d4b61eb8a144aa29f7 (patch)
tree59f7a55c0df4697a2efa66456ba5c493f44066b4
parentaa1b718b769c34f35c66ed11e516a350fc51d547 (diff)
downloadgcc-063907abadf6ee9ffe4d60d4b61eb8a144aa29f7.zip
gcc-063907abadf6ee9ffe4d60d4b61eb8a144aa29f7.tar.gz
gcc-063907abadf6ee9ffe4d60d4b61eb8a144aa29f7.tar.bz2
[Ada] Fix bogus style check failure with pragma Style_Checks (Off)
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. From-SVN: r274352
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/sem.adb1
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 162d027..a34c4ee 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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
diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb
index 2f8f6a4..9b6b335 100644
--- a/gcc/ada/sem.adb
+++ b/gcc/ada/sem.adb
@@ -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