diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-01-03 16:32:19 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-01-03 16:32:19 +0100 |
commit | 5f3ab6fbf007f309b823cd77f1d3eed52ee0d0a7 (patch) | |
tree | b913840c88dfad71cc2715a06794206e2889a7a3 /gcc/ada/lib-writ.adb | |
parent | b1c1e25cb023b3b8f26f9ad3701a7fd61c9e25f4 (diff) | |
download | gcc-5f3ab6fbf007f309b823cd77f1d3eed52ee0d0a7.zip gcc-5f3ab6fbf007f309b823cd77f1d3eed52ee0d0a7.tar.gz gcc-5f3ab6fbf007f309b823cd77f1d3eed52ee0d0a7.tar.bz2 |
s-atacco.ads, [...]: Protect use of 'Constrained by warnings on/off...
* s-atacco.ads, a-direio.adb: Protect use of 'Constrained by warnings
on/off, since this is an obsolescent feature, for which we now generate
a warning.
* sem_attr.adb (Analyze_Attribute, case Constrained): Issue warning if
warning mode is set and obsolescent usage of this attribute occurs.
(Resolve_Access, case 'Access): Note that GNAT uses the context type to
disambiguate overloaded prefixes, in accordance with AI-235. GNAT code
predates, and partly motivates, the adoption of the AI.
Implement new Ada 2005 attribute Mod
* exp_attr.adb (Expand_N_Attribute_Reference): Implement Ada 2005
attribute Mod.
* par-ch4.adb (P_Name): In Ada 2005 mode, recognize new attribute Mod
* snames.h, snames.ads, snames.adb: Add entry for No_Dependence for
pragma restrictions.
New entry for Ada 2005 attribute Mod.
* par-prag.adb:
Add recognition of new pragma Restrictions No_Dependence
Recognize restriction No_Obsolescent_Features at parse time
* bcheck.adb: Add circuitry for checking for consistency of
No_Dependence restrictions.
* lib-writ.ads, lib-writ.adb: Output new R lines for No_Dependence
restrictions.
* restrict.ads, restrict.adb: Add subprograms to deal with
No_Dependence restrictions.
* rtsfind.adb: Check that implicit with's do not violate No_Dependence
restrictions.
* sem_ch3.adb, sem_ch11.adb, sem_ch13.adb, lib-xref.adb,
sem_attr.adb: Add check for new restriction No_Obsolescent_Features
* scn.ads, prj-err.ads, prj-err.adb, ali-util.adb, gprep.adb: Add new
dummy parameter to scng instantiation.
Needed for new restriction No_Obsolescent_Features
* scn.adb: (Obsolescent_Check): New procedure
Needed for new restriction No_Obsolescent_Features
* scng.ads, scng.adb: Always allow wide characters in Ada 2005 mode, as
specified by AI-285, needed for implementation of AI-388 (adding greek
pi to Ada.Numerics).
Add new generic formal to scng, needed for new restriction
No_Obsolescent_Features.
* s-rident.ads: Add new restriction No_Obsolescent_Features.
* ali.ads, ali.adb: Adjustments for reading new No_Dependence
restrictions lines.
(Scan_ALI): When finding an unexpected character on an R line, raise
exception Bad_R_Line, instead of calling Fatal_Error, so that, when
Ignore_Errors is True, default restrictions are set and scanning of the
ALI file continues with the next line. Also, when Bad_R_Line is raised
and Ignore_Errors is True, skip to the end of le line.
* sem_ch10.adb: Check that explicit with's do not violate
No_Dependence restrictions.
(Install_Withed_Unit): Add code to implement AI-377 and diagnose
illegal context clauses containing child units of instance.
* sem_prag.adb: Processing and checking for new No_Dependence
restrictions.
(Analyze_Pragma, case Psect_Object): Call Check_Arg_Is_External_Name to
analyze and check the External argument.
* a-numeri.ads: Add greek letter pi as alternative spelling of Pi
From-SVN: r92829
Diffstat (limited to 'gcc/ada/lib-writ.adb')
-rw-r--r-- | gcc/ada/lib-writ.adb | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb index 3624054..2de8789 100644 --- a/gcc/ada/lib-writ.adb +++ b/gcc/ada/lib-writ.adb @@ -53,6 +53,14 @@ with System.WCh_Con; use System.WCh_Con; package body Lib.Writ is + ----------------------- + -- Local Subprograms -- + ----------------------- + + procedure Write_Unit_Name (N : Node_Id); + -- Used to write out the unit name for R (pragma Restriction) lines + -- for uses of Restriction (No_Dependence => unit-name). + ---------------------------------- -- Add_Preprocessing_Dependency -- ---------------------------------- @@ -940,7 +948,7 @@ package body Lib.Writ is end if; end loop; - -- Output restrictions line + -- Output first restrictions line Write_Info_Initiate ('R'); Write_Info_Char (' '); @@ -987,6 +995,19 @@ package body Lib.Writ is Write_Info_EOL; + -- Output R lines for No_Dependence entries + + for J in No_Dependence.First .. No_Dependence.Last loop + if In_Extended_Main_Source_Unit (No_Dependence.Table (J).Unit) + and then not No_Dependence.Table (J).Warn + then + Write_Info_Initiate ('R'); + Write_Info_Char (' '); + Write_Unit_Name (No_Dependence.Table (J).Unit); + Write_Info_EOL; + end if; + end loop; + -- Output interrupt state lines for J in Interrupt_States.First .. Interrupt_States.Last loop @@ -1099,7 +1120,23 @@ package body Lib.Writ is Output_References; Write_Info_Terminate; Close_Output_Library_Info; - end Write_ALI; + --------------------- + -- Write_Unit_Name -- + --------------------- + + procedure Write_Unit_Name (N : Node_Id) is + begin + if Nkind (N) = N_Identifier then + Write_Info_Name (Chars (N)); + + else + pragma Assert (Nkind (N) = N_Selected_Component); + Write_Unit_Name (Prefix (N)); + Write_Info_Char ('.'); + Write_Unit_Name (Selector_Name (N)); + end if; + end Write_Unit_Name; + end Lib.Writ; |