[Ada] Fix ineffective -gnatyN for separate compilation units
Pierre-Marie de Rodat
derodat@adacore.com
Tue Sep 17 08:06:00 GMT 2019
This fixes a recent regression introduced in the machinery giving style
warnings: the -gnatyN switch no longer cancels an earlier -gnaty switch
for separate compilation units.
Running this command:
gcc -c slib.adb -gnatyaAbcefhiIklmM25OnprStux -gnatyN
On the following sources:
package Slib is
procedure I_Am_Short;
end Slib;
with Ada.Text_IO; use Ada.Text_IO;
package body Slib is
-- have a long line here as well.
procedure I_Am_Short is separate;
end Slib;
separate (Slib)
procedure I_Am_Short is
begin
Put_Line (".......................................................");
end I_Am_Short;
Should execute silently.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* sem.adb (Do_Analyze): Save Style_Check_Max_Line_Length on
entry and restore it on exit instead of recomputing it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 795 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190917/77a84197/attachment.bin>
More information about the Gcc-patches
mailing list