aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/ali.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2005-01-03 16:32:19 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2005-01-03 16:32:19 +0100
commit5f3ab6fbf007f309b823cd77f1d3eed52ee0d0a7 (patch)
treeb913840c88dfad71cc2715a06794206e2889a7a3 /gcc/ada/ali.adb
parentb1c1e25cb023b3b8f26f9ad3701a7fd61c9e25f4 (diff)
downloadgcc-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/ali.adb')
-rw-r--r--gcc/ada/ali.adb32
1 files changed, 24 insertions, 8 deletions
diff --git a/gcc/ada/ali.adb b/gcc/ada/ali.adb
index c1e51b4..0f18205 100644
--- a/gcc/ada/ali.adb
+++ b/gcc/ada/ali.adb
@@ -84,6 +84,7 @@ package body ALI is
-- Initialize all tables
ALIs.Init;
+ No_Deps.Init;
Units.Init;
Withs.Init;
Sdep.Init;
@@ -199,7 +200,7 @@ package body ALI is
-- quote.
function Get_Nat return Nat;
- -- Skip blanks, then scan out an unsigned integer value in Nat range.
+ -- Skip blanks, then scan out an unsigned integer value in Nat range
function Get_Stamp return Time_Stamp_Type;
-- Skip blanks, then scan out a time stamp
@@ -212,7 +213,7 @@ package body ALI is
-- at end of line). Also skips past any following blank lines.
procedure Skip_Line;
- -- Skip rest of current line and any following blank lines.
+ -- Skip rest of current line and any following blank lines
procedure Skip_Space;
-- Skip past white space (blanks or horizontal tab)
@@ -948,7 +949,7 @@ package body ALI is
C := Getc;
Check_Unknown_Line;
- -- Acquire restrictions line
+ -- Acquire first restrictions line
while C /= 'R' loop
if Ignore_Errors then
@@ -974,7 +975,7 @@ package body ALI is
-- Save cumulative restrictions in case we have a fatal error
Bad_R_Line : exception;
- -- Signal bad restrictions line
+ -- Signal bad restrictions line (raised on unexpected character)
begin
Checkc (' ');
@@ -998,7 +999,7 @@ package body ALI is
null;
when others =>
- Fatal_Error;
+ raise Bad_R_Line;
end case;
end loop;
@@ -1031,7 +1032,7 @@ package body ALI is
end;
when others =>
- Fatal_Error;
+ raise Bad_R_Line;
end case;
-- Acquire restrictions violations information
@@ -1078,7 +1079,7 @@ package body ALI is
end if;
when others =>
- Fatal_Error;
+ raise Bad_R_Line;
end case;
end loop;
@@ -1095,6 +1096,7 @@ package body ALI is
if Ignore_Errors then
Cumulative_Restrictions := Save_R;
ALIs.Table (Id).Restrictions := Restrictions_Initial;
+ Skip_Eol;
-- In normal mode, this is a fatal error
@@ -1105,9 +1107,23 @@ package body ALI is
end Scan_Restrictions;
end if;
- -- Acquire 'I' lines if present
+ -- Acquire additional restrictions (No_Dependence) lines if present
C := Getc;
+ while C = 'R' loop
+ if Ignore ('R') then
+ Skip_Line;
+ else
+ Skip_Space;
+ No_Deps.Append ((Id, Get_Name));
+ end if;
+
+ Skip_Eol;
+ C := Getc;
+ end loop;
+
+ -- Acquire 'I' lines if present
+
Check_Unknown_Line;
while C = 'I' loop