diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-13 10:24:46 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-13 10:24:46 +0000 |
commit | 8cc59fa3df92c095c8fac0ce70bca19902ec3389 (patch) | |
tree | c7c2be77cbb0fac9968fa1b4ce500bd59db9d31d /gcc/ada/gnatls.adb | |
parent | d7bdd8d321be21812e90e422a014e68937389e9a (diff) | |
download | gcc-8cc59fa3df92c095c8fac0ce70bca19902ec3389.tar.gz |
2004-08-13 Olivier Hainque <hainque@act-europe.fr>
* decl.c (gnat_to_gnu_entity) <E_Variable>: When building an allocator
for a global aliased object with a variable size and an unconstrained
nominal subtype, pretend there is no initializer if the one we have is
incomplete, and avoid referencing an inexistant component in there. The
part we have will be rebuilt anyway and the reference may confuse
further operations.
2004-08-13 Thomas Quinot <quinot@act-europe.fr>
* einfo.ads: Minor reformatting
* lib-writ.adb (Output_Main_Program_Line): Do not set parameter
restrictions in the ALI if we only want to warn about violations.
2004-08-13 Vincent Celier <celier@gnat.com>
* ali.adb (Scan_ALI): Initialize component Body_Needed_For_SAL to False
when creating a new Unit_Record in table Units.
* gnatls.adb (Output_Unit): In verbose mode, output the restrictions
that are violated, if any.
* prj-nmsc.adb (Ada_Check.Get_Path_Names_And_Record_Sources): Do not
add directory separator if path already ends with a directory separator.
2004-08-13 Ed Schonberg <schonberg@gnat.com>
* rtsfind.adb (Entity_Not_Defined): If the error ocurrs in a predefined
unit, this is an attempt to inline a construct that is not available in
the current restricted mode, so abort rather than trying to continue.
* sem_ch3.adb (Build_Underlying_Full_View): If the new type has
discriminants that rename those of the parent, recover names of
original discriminants for the constraint on the full view of the
parent.
(Complete_Private_Subtype): Do not create a subtype declaration if the
subtype is an itype.
* gnat_rm.texi: Added section on implementation of discriminated
records with default values for discriminants.
2004-08-13 Ed Schonberg <schonberg@gnat.com>
PR ada/15601
* sem_res.adb (Make_Call_Into_Operator): Handle properly the case where
the second operand is overloaded.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85934 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gnatls.adb')
-rw-r--r-- | gcc/ada/gnatls.adb | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/gcc/ada/gnatls.adb b/gcc/ada/gnatls.adb index 30356057151..5c269916371 100644 --- a/gcc/ada/gnatls.adb +++ b/gcc/ada/gnatls.adb @@ -513,9 +513,11 @@ procedure Gnatls is else Write_Str ("Unit => "); - Write_Eol; Write_Str (" Name => "); + Write_Eol; + Write_Str (" Name => "); Write_Str (Name_Buffer (1 .. Name_Len)); - Write_Eol; Write_Str (" Kind => "); + Write_Eol; + Write_Str (" Kind => "); if Units.Table (U_Id).Unit_Kind = 'p' then Write_Str ("package "); @@ -547,7 +549,8 @@ procedure Gnatls is U.Body_Needed_For_SAL or U.Elaborate_Body then - Write_Eol; Write_Str (" Flags =>"); + Write_Eol; + Write_Str (" Flags =>"); if U.Preelab then Write_Str (" Preelaborable"); @@ -631,7 +634,8 @@ procedure Gnatls is -- Display these restrictions. if Restrictions.Set /= (All_Restrictions => False) then - Write_Eol; Write_Str (" Restrictions =>"); + Write_Eol; + Write_Str (" pragma Restrictions =>"); -- For boolean restrictions, just display the name of the -- restriction; for valued restrictions, also display the @@ -650,12 +654,45 @@ procedure Gnatls is end if; end loop; end if; + + -- If the unit violates some Restrictions, display the list of + -- these restrictions. + + if Restrictions.Violated /= (All_Restrictions => False) then + Write_Eol; + Write_Str (" Restrictions violated =>"); + + -- For boolean restrictions, just display the name of the + -- restriction; for valued restrictions, also display the + -- restriction value. + + for Restriction in All_Restrictions loop + if Restrictions.Violated (Restriction) then + Write_Eol; + Write_Str (" "); + Write_Str (Image (Restriction)); + + if Restriction in All_Parameter_Restrictions then + if Restrictions.Count (Restriction) > 0 then + Write_Str (" =>"); + + if Restrictions.Unknown (Restriction) then + Write_Str (" at least"); + end if; + + Write_Str (Restrictions.Count (Restriction)'Img); + end if; + end if; + end if; + end loop; + end if; end; end if; if Print_Source then if Too_Long then - Write_Eol; Write_Str (" "); + Write_Eol; + Write_Str (" "); else Write_Str (Spaces (Unit_Start + Name_Len + 1 .. Unit_End)); end if; |