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_prag.ads | |
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_prag.ads')
-rw-r--r-- | gcc/ada/sem_prag.ads | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/gcc/ada/sem_prag.ads b/gcc/ada/sem_prag.ads index db7bcbb..9a951ff 100644 --- a/gcc/ada/sem_prag.ads +++ b/gcc/ada/sem_prag.ads @@ -244,16 +244,21 @@ package Sem_Prag is procedure Analyze_Test_Case_In_Decl_Part (N : Node_Id); -- Perform preanalysis of pragma Test_Case - procedure Build_Classwide_Expression (Prag : Node_Id; Subp : Entity_Id); + procedure Build_Classwide_Expression + (Prag : Node_Id; + Subp : Entity_Id; + Adjust_Sloc : Boolean); -- Build the expression for an inherited classwide condition. Prag is -- the pragma constructed from the corresponding aspect of the parent - -- subprogram, and Subp is the overridding operation. - -- The routine is also called to check whether an inherited operation - -- that is not overridden but has inherited conditions need a wrapper, - -- because the inherited condition includes calls to other primitives that - -- have been overridden. In that case the first argument is the expression - -- of the original classwide aspect. In SPARK_Mode, such operation which - -- are just inherited but have modified pre/postconditions are illegal. + -- subprogram, and Subp is the overridding operation. Adjust_Sloc is True + -- when the sloc of nodes traversed should be adjusted for the inherited + -- pragma. The routine is also called to check whether an inherited + -- operation that is not overridden but has inherited conditions need + -- a wrapper, because the inherited condition includes calls to other + -- primitives that have been overridden. In that case the first argument + -- is the expression of the original classwide aspect. In SPARK_Mode, such + -- operation which are just inherited but have modified pre/postconditions + -- are illegal. function Build_Pragma_Check_Equivalent (Prag : Node_Id; |