aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/restrict.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-05-26 12:29:25 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2015-05-26 12:29:25 +0200
commit596b25f9a110b88d8c7e5fb1fa6cae5819b21691 (patch)
tree5089f66e930abb4b53e1d7f2bee15a14da92a0ff /gcc/ada/restrict.adb
parent1b961de9db0b7ffb8d7f4614ddf61faf31a544a5 (diff)
downloadgcc-596b25f9a110b88d8c7e5fb1fa6cae5819b21691.zip
gcc-596b25f9a110b88d8c7e5fb1fa6cae5819b21691.tar.gz
gcc-596b25f9a110b88d8c7e5fb1fa6cae5819b21691.tar.bz2
[multiple changes]
2015-05-26 Robert Dewar <dewar@adacore.com> * sem_aggr.adb (Resolve_Array_Aggregate): Defend against bad bounds. * debug.adb: Document -gnatd.k. * erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k. 2015-05-26 Robert Dewar <dewar@adacore.com> * gnat1drv.adb (Gnat1drv): Provide new arguments for Get_Target_Parameters. * restrict.adb (Set_Restriction_No_Specification_Of_Aspect): new procedure. (Set_Restriction_No_Use_Of_Attribute): new procedure. * restrict.ads (Set_Restriction_No_Specification_Of_Aspect): new procedure. (Set_Restriction_No_Use_Of_Attribute): new procedure. * s-rident.ads (Integer_Parameter_Restrictions): New subtype. * targparm.adb (Get_Target_Parameters): Allow new restriction pragmas No_Specification_Of_Aspect No_Use_Of_Attribute No_Use_Of_Pragma. * targparm.ads: New parameters for Get_Target_Parameters. * tbuild.adb (Set_NOD): New name for Set_RND. (Set_NSA): New procedure. (Set_NUA): New procedure. (Set_NUP): New procedure. * tbuild.ads (Make_SC): Minor reformatting. (Set_NOD): New name for Set_RND. (Set_NSA, Set_NUA, Set_NUP): New procedure. 2015-05-26 Ed Schonberg <schonberg@adacore.com> * a-stwise.adb (Find_Token): If source'first is not positive, an exception must be raised, as specified by RM 2005 A.4.3 (68/1). This must be checked explicitly, given that run-time files are normally compiled without constraint checks. * a-stzsea.adb (Find_Token): Ditto. 2015-05-26 Ed Schonberg <schonberg@adacore.com> * sem_util.ads sem_util.adb (Is_Current_Instance): New predicate to fully implement RM 8.6 (17/3). which earlier only applied to synchronized types. Used to preanalyze aspects that include current instances of types, such as Predicate and Invariant. * sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance. * sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original expression of aspect and analyze it to provide proper type information. 2015-05-26 Robert Dewar <dewar@adacore.com> * rtsfind.ads: Add entries for RE_Exn[_Long]_Float. * s-exnllf.adb (Exn_Float): New function. (Exn_Long_Float): New function. (Exn_Long_Long_Float): Rewritten interface. (Exp): New name for what used to be Exn_Long_Long_Float. * s-exnllf.ads (Exn_Float): New function. (Exn_Long_Float): New function. 2015-05-26 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Find_Selected_Component): Do not emit an error on a selected component when the prefix is a type name that is a Current_Instance. * einfo.ads: Minor grammar fix. 2015-05-26 Doug Rupp <rupp@adacore.com> * init.c [vxworks] (sysLib.h): Only for x86. From-SVN: r223678
Diffstat (limited to 'gcc/ada/restrict.adb')
-rw-r--r--gcc/ada/restrict.adb27
1 files changed, 24 insertions, 3 deletions
diff --git a/gcc/ada/restrict.adb b/gcc/ada/restrict.adb
index 661a05a..2dae272 100644
--- a/gcc/ada/restrict.adb
+++ b/gcc/ada/restrict.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -23,7 +23,6 @@
-- --
------------------------------------------------------------------------------
-with Aspects; use Aspects;
with Atree; use Atree;
with Casing; use Casing;
with Einfo; use Einfo;
@@ -35,7 +34,6 @@ with Lib; use Lib;
with Opt; use Opt;
with Sinfo; use Sinfo;
with Sinput; use Sinput;
-with Snames; use Snames;
with Stand; use Stand;
with Uname; use Uname;
@@ -111,6 +109,8 @@ package body Restrict is
No_Use_Of_Pragma : array (Pragma_Id) of Source_Ptr :=
(others => No_Location);
+ -- Source location of pragma No_Use_Of_Pragma for given pragma, a value
+ -- of Sysstem_Location indicates occurrence in system.ads.
No_Use_Of_Pragma_Warning : array (Pragma_Id) of Boolean :=
(others => False);
@@ -1569,6 +1569,13 @@ package body Restrict is
No_Specification_Of_Aspect_Set := True;
end Set_Restriction_No_Specification_Of_Aspect;
+ procedure Set_Restriction_No_Specification_Of_Aspect (A_Id : Aspect_Id) is
+ begin
+ No_Specification_Of_Aspects (A_Id) := System_Location;
+ No_Specification_Of_Aspect_Warning (A_Id) := False;
+ No_Specification_Of_Aspect_Set := True;
+ end Set_Restriction_No_Specification_Of_Aspect;
+
-----------------------------------------
-- Set_Restriction_No_Use_Of_Attribute --
-----------------------------------------
@@ -1588,6 +1595,13 @@ package body Restrict is
end if;
end Set_Restriction_No_Use_Of_Attribute;
+ procedure Set_Restriction_No_Use_Of_Attribute (A_Id : Attribute_Id) is
+ begin
+ No_Use_Of_Attribute_Set := True;
+ No_Use_Of_Attribute (A_Id) := System_Location;
+ No_Use_Of_Attribute_Warning (A_Id) := False;
+ end Set_Restriction_No_Use_Of_Attribute;
+
--------------------------------------
-- Set_Restriction_No_Use_Of_Pragma --
--------------------------------------
@@ -1607,6 +1621,13 @@ package body Restrict is
end if;
end Set_Restriction_No_Use_Of_Pragma;
+ procedure Set_Restriction_No_Use_Of_Pragma (A_Id : Pragma_Id) is
+ begin
+ No_Use_Of_Pragma_Set := True;
+ No_Use_Of_Pragma_Warning (A_Id) := False;
+ No_Use_Of_Pragma (A_Id) := System_Location;
+ end Set_Restriction_No_Use_Of_Pragma;
+
--------------------------------
-- Check_SPARK_05_Restriction --
--------------------------------