aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinput.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2016-07-04 12:09:04 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2016-07-04 12:09:04 +0200
commit96df3ff4bd3b0f2ce63f519955f20f7d93612929 (patch)
tree9009e6f1cf9433a4d1de015b6f0b48fb40e0a7c9 /gcc/ada/sinput.adb
parent015f33d73ec6634c9b96637fff73c49ac5f0ba9f (diff)
downloadgcc-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/sinput.adb')
-rw-r--r--gcc/ada/sinput.adb18
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ada/sinput.adb b/gcc/ada/sinput.adb
index 0800f31..0105b2c 100644
--- a/gcc/ada/sinput.adb
+++ b/gcc/ada/sinput.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2016, 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- --
@@ -300,6 +300,17 @@ package body Sinput is
end case;
end Check_For_BOM;
+ ---------------------------------
+ -- Comes_From_Inherited_Pragma --
+ ---------------------------------
+
+ function Comes_From_Inherited_Pragma (S : Source_Ptr) return Boolean is
+ SIE : Source_File_Record renames
+ Source_File.Table (Get_Source_File_Index (S));
+ begin
+ return SIE.Inherited_Pragma;
+ end Comes_From_Inherited_Pragma;
+
-----------------------------
-- Comes_From_Inlined_Body --
-----------------------------
@@ -1190,6 +1201,11 @@ package body Sinput is
return Source_File.Table (S).Identifier_Casing;
end Identifier_Casing;
+ function Inherited_Pragma (S : SFI) return Boolean is
+ begin
+ return Source_File.Table (S).Inherited_Pragma;
+ end Inherited_Pragma;
+
function Inlined_Body (S : SFI) return Boolean is
begin
return Source_File.Table (S).Inlined_Body;