diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-07-04 12:09:04 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-07-04 12:09:04 +0200 |
commit | 96df3ff4bd3b0f2ce63f519955f20f7d93612929 (patch) | |
tree | 9009e6f1cf9433a4d1de015b6f0b48fb40e0a7c9 /gcc/ada/sem_ch12.adb | |
parent | 015f33d73ec6634c9b96637fff73c49ac5f0ba9f (diff) | |
download | gcc-96df3ff4bd3b0f2ce63f519955f20f7d93612929.zip gcc-96df3ff4bd3b0f2ce63f519955f20f7d93612929.tar.gz gcc-96df3ff4bd3b0f2ce63f519955f20f7d93612929.tar.bz2 |
[multiple changes]
2016-07-04 Bob Duff <duff@adacore.com>
* xref_lib.adb (Parse_X_Filename, Parse_Identifier_Info): Ignore
unknown files. Check that File_Nr is in the range of files we
know about. The previous code was checking the lower bound,
but not the upper bound.
2016-07-04 Arnaud Charlet <charlet@adacore.com>
* tracebak.c: Minor reformatting.
2016-07-04 Yannick Moy <moy@adacore.com>
* sem_ch12.adb, sem_ch12.ads Update calls to
Create_Instantiation_Source to use default argument.
(Adjust_Inherited_Pragma_Sloc): New function to adjust sloc
of inherited pragma.
(Set_Copied_Sloc_For_Inherited_Pragma):
New function that wraps call to Create_Instantiation_Source for
copying an inherited pragma.
(Set_Copied_Sloc_For_Inlined_Body): Update call to
Create_Instantiation_Source with new arguments.
* sem_prag.adb (Build_Pragma_Check_Equivalent): In the case
of inherited pragmas, use the generic machinery to get chained
locations for the pragma and its sub-expressions.
* sinput-c.adb: Adapt to new type Source_File_Record.
* sinput-l.adb, sinput-l.ads (Create_Instantiation_Source):
Add parameter Inherited_Pragma and make parameter Inlined_Body
optional.
* sinput.adb, sinput.ads (Comes_From_Inherited_Pragma): New
function to return when a location comes from an inherited pragma.
(Inherited_Pragma): New function to detect when a location comes
from an inherited pragma.
(Source_File_Record): New component Inherited_Pragma.
2016-07-04 Yannick Moy <moy@adacore.com>
* sem_elab.adb: Register existence of quickfix for error message.
2016-07-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Resolve_One_Call): In the context of a predicate
function the formal and the actual in a call may have different
views of the same type, because of the delayed analysis of
predicates aspects. Extend the patch that handles this potential
discrepancy to handle private and full views as well.
* sem_ch8.adb (Find_Selected_Component): Refine predicate that
produces additional error when an illegal selected component
looks like a prefixed call whose first formal is untagged.
From-SVN: r237963
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r-- | gcc/ada/sem_ch12.adb | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index f62c30f..8e38db0 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -1052,6 +1052,15 @@ package body Sem_Ch12 is SPARK_Mode_Pragma => SPARK_Mode_Pragma)); end Add_Pending_Instantiation; + ---------------------------------- + -- Adjust_Inherited_Pragma_Sloc -- + ---------------------------------- + + procedure Adjust_Inherited_Pragma_Sloc (N : Node_Id) is + begin + Adjust_Instantiation_Sloc (N, S_Adjustment); + end Adjust_Inherited_Pragma_Sloc; + -------------------------- -- Analyze_Associations -- -------------------------- @@ -2641,7 +2650,7 @@ package body Sem_Ch12 is end if; Formal := New_Copy (Pack_Id); - Create_Instantiation_Source (N, Gen_Unit, False, S_Adjustment); + Create_Instantiation_Source (N, Gen_Unit, S_Adjustment); -- Make local generic without formals. The formals will be replaced with -- internal declarations. @@ -3786,7 +3795,7 @@ package body Sem_Ch12 is -- validate an actual package, the instantiation environment is that -- of the enclosing instance. - Create_Instantiation_Source (N, Gen_Unit, False, S_Adjustment); + Create_Instantiation_Source (N, Gen_Unit, S_Adjustment); -- Copy original generic tree, to produce text for instantiation @@ -5138,7 +5147,7 @@ package body Sem_Ch12 is Generic_Renamings.Set_Last (0); Generic_Renamings_HTable.Reset; - Create_Instantiation_Source (N, Gen_Unit, False, S_Adjustment); + Create_Instantiation_Source (N, Gen_Unit, S_Adjustment); -- Copy original generic tree, to produce text for instantiation @@ -7646,7 +7655,6 @@ package body Sem_Ch12 is Create_Instantiation_Source (Instantiation_Node, Defining_Entity (N), - False, S_Adjustment); end if; @@ -10888,7 +10896,7 @@ package body Sem_Ch12 is Gen_Body := Unit_Declaration_Node (Gen_Body_Id); Create_Instantiation_Source - (Inst_Node, Gen_Body_Id, False, S_Adjustment); + (Inst_Node, Gen_Body_Id, S_Adjustment); Act_Body := Copy_Generic_Node @@ -11229,7 +11237,6 @@ package body Sem_Ch12 is Create_Instantiation_Source (Inst_Node, Gen_Body_Id, - False, S_Adjustment); Act_Body := @@ -15139,13 +15146,30 @@ package body Sem_Ch12 is end loop; end Save_Global_References_In_Aspects; + ------------------------------------------ + -- Set_Copied_Sloc_For_Inherited_Pragma -- + ------------------------------------------ + + procedure Set_Copied_Sloc_For_Inherited_Pragma + (N : Node_Id; + E : Entity_Id) is + begin + Create_Instantiation_Source (N, E, + Inlined_Body => False, + Inherited_Pragma => True, + A => S_Adjustment); + end Set_Copied_Sloc_For_Inherited_Pragma; + -------------------------------------- -- Set_Copied_Sloc_For_Inlined_Body -- -------------------------------------- procedure Set_Copied_Sloc_For_Inlined_Body (N : Node_Id; E : Entity_Id) is begin - Create_Instantiation_Source (N, E, True, S_Adjustment); + Create_Instantiation_Source (N, E, + Inlined_Body => True, + Inherited_Pragma => False, + A => S_Adjustment); end Set_Copied_Sloc_For_Inlined_Body; --------------------- |