summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_intr.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-18 10:35:36 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-18 10:35:36 +0000
commitb30066a2191b901d06e7b99813895ebc455f830b (patch)
tree46674070eeb533c4c09eb2241ee5572368108be3 /gcc/ada/exp_intr.adb
parentc8e62037406d1a2928e984e59908fc9756264a74 (diff)
downloadgcc-b30066a2191b901d06e7b99813895ebc455f830b.tar.gz
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Record_Aggregate): If Warn_On_Redundant_Constructs is enabled, report a redundant box association that does not cover any components, as it done for redundant others associations in case statements. 2016-04-18 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Analyze the generated Check pragma for an inherited condition so that it does not freeze the dispatching type of the primitive operation, because it is pre-analyzed at the point of the subprogram declaration (and not in the subprogram body, as is done during regular expansion). 2016-04-18 Vincent Celier <celier@adacore.com> * ali.ads: Increase the range of all _Id types to 100 millions. 2016-04-18 Gary Dismukes <dismukes@adacore.com> * sem_warn.adb (Check_References): Change warning to suggest using pragma Export rather than saying "volatile has no effect". 2016-04-18 Bob Duff <duff@adacore.com> * g-souinf.ads (Compilation_ISO_Date): New function to return the current date in ISO form. * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand a call to Compilation_ISO_Date into a string literal containing the current date in ISO form. * exp_intr.ads (Add_Source_Info): Improve documentation. * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize Compilation_ISO_Date. * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235120 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_intr.adb')
-rw-r--r--gcc/ada/exp_intr.adb23
1 files changed, 15 insertions, 8 deletions
diff --git a/gcc/ada/exp_intr.adb b/gcc/ada/exp_intr.adb
index beaa24af9e5..b8f1fe49edd 100644
--- a/gcc/ada/exp_intr.adb
+++ b/gcc/ada/exp_intr.adb
@@ -107,14 +107,10 @@ package body Exp_Intr is
-- System.Address_To_Access_Conversions.
procedure Expand_Source_Info (N : Node_Id; Nam : Name_Id);
- -- Rewrite the node by the appropriate string or positive constant.
- -- Nam can be one of the following:
- -- Name_File - expand string name of source file
- -- Name_Line - expand integer line number
- -- Name_Source_Location - expand string of form file:line
- -- Name_Enclosing_Entity - expand string name of enclosing entity
- -- Name_Compilation_Date - expand string with compilation date
- -- Name_Compilation_Time - expand string with compilation time
+ -- Rewrite the node as the appropriate string literal or positive
+ -- constant. Nam is the name of one of the intrinsics declared in
+ -- GNAT.Source_Info; see g-souinf.ads for documentation of these
+ -- intrinsics.
procedure Write_Entity_Name (E : Entity_Id);
-- Recursive procedure to construct string for qualified name of enclosing
@@ -165,6 +161,10 @@ package body Exp_Intr is
Write_Entity_Name (Ent);
+ when Name_Compilation_ISO_Date =>
+ Name_Buffer (1 .. 10) := Opt.Compilation_Time (1 .. 10);
+ Name_Len := 10;
+
when Name_Compilation_Date =>
declare
subtype S13 is String (1 .. 3);
@@ -696,6 +696,7 @@ package body Exp_Intr is
Name_Line,
Name_Source_Location,
Name_Enclosing_Entity,
+ Name_Compilation_ISO_Date,
Name_Compilation_Date,
Name_Compilation_Time)
then
@@ -851,6 +852,8 @@ package body Exp_Intr is
------------------------
procedure Expand_Source_Info (N : Node_Id; Nam : Name_Id) is
+ -- ???There is duplicated code here (see Add_Source_Info)
+
Loc : constant Source_Ptr := Sloc (N);
Ent : Entity_Id;
@@ -891,6 +894,10 @@ package body Exp_Intr is
Write_Entity_Name (Ent);
+ when Name_Compilation_ISO_Date =>
+ Name_Buffer (1 .. 10) := Opt.Compilation_Time (1 .. 10);
+ Name_Len := 10;
+
when Name_Compilation_Date =>
declare
subtype S13 is String (1 .. 3);