Commit 063907ab by Eric Botcazou Committed by Pierre-Marie de Rodat

[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
parent aa1b718b
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> 2019-08-13 Arnaud Charlet <charlet@adacore.com>
* sem_ch13.adb (Check_Iterator_Functions): Protect against * sem_ch13.adb (Check_Iterator_Functions): Protect against
......
...@@ -1395,6 +1395,7 @@ package body Sem is ...@@ -1395,6 +1395,7 @@ package body Sem is
Restore_Scope_Stack (List); Restore_Scope_Stack (List);
Restore_Ghost_Region (Saved_GM, Saved_IGR); Restore_Ghost_Region (Saved_GM, Saved_IGR);
Style_Max_Line_Length := Saved_ML; Style_Max_Line_Length := Saved_ML;
Style_Check_Max_Line_Length := Style_Max_Line_Length /= 0;
end Do_Analyze; end Do_Analyze;
-- Local variables -- Local variables
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment