aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/makeutl.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-01-29 16:32:42 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-01-29 16:32:42 +0100
commit5627964c4ae9de7ac15ed4a4e833a2a27e534e2b (patch)
tree4ce74672c4eaa4ed8aab543e4cb09646b1e79712 /gcc/ada/makeutl.adb
parentd7af5ea5e1fa0a97b4cd7decf14cbcc9686b1524 (diff)
downloadgcc-5627964c4ae9de7ac15ed4a4e833a2a27e534e2b.zip
gcc-5627964c4ae9de7ac15ed4a4e833a2a27e534e2b.tar.gz
gcc-5627964c4ae9de7ac15ed4a4e833a2a27e534e2b.tar.bz2
[multiple changes]
2014-01-29 Hristian Kirtchev <kirtchev@adacore.com> * einfo.adb Flag264 is now unused. (Has_Body_References): Removed. (Set_Has_Body_References): Removed. (Write_Entity_Flags): Remove the output for flag Has_Body_References. * einfo.ads Update the comment on usage of attribute Body_References. Remove attribute Has_Body_References and its usage in nodes. (Has_Body_References): Removed along with pragma Inline. (Set_Has_Body_References): Removed along with pragma Inline. * sem_prag.adb (Analyze_Global_Item): Move the call to Record_Possible_Body_Reference in the state related checks section. Add a comment intended function. (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference in the state related checks section. Add a comment intended function. (Analyze_Refinement_Clause): Cleanup the illegal body reference reporting. Add a comment on timing of error reporting. (Record_Possible_Body_Reference): Reimplement the routine. 2014-01-29 Vincent Celier <celier@adacore.com> * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for unit-based languages. (Mains.Complete_Mains.Do_Complete): Use the source file project tree when calling Find_File_Add_Extension. Use the correct project name when reporting an error. From-SVN: r207252
Diffstat (limited to 'gcc/ada/makeutl.adb')
-rw-r--r--gcc/ada/makeutl.adb14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/ada/makeutl.adb b/gcc/ada/makeutl.adb
index 4a8f8a8..c546931 100644
--- a/gcc/ada/makeutl.adb
+++ b/gcc/ada/makeutl.adb
@@ -1654,9 +1654,11 @@ package body Makeutl is
end if;
end if;
- elsif Source.Kind = Spec then
- -- A spec needs to be taken into account unless there is
- -- also a body. So we delay the decision for them.
+ elsif Source.Kind = Spec
+ and then Source.Language.Config.Kind = Unit_Based
+ then
+ -- An Ada spec needs to be taken into account unless there
+ -- is also a body. So we delay the decision for them.
Get_Name_String (Source.File);
@@ -1785,7 +1787,7 @@ package body Makeutl is
if Source = No_Source then
Source := Find_File_Add_Extension
- (Tree, Get_Name_String (Main_Id));
+ (File.Tree, Get_Name_String (Main_Id));
end if;
if Is_Absolute
@@ -1852,10 +1854,10 @@ package body Makeutl is
-- reported later.
Error_Msg_File_1 := Main_Id;
- Error_Msg_Name_1 := Root_Project.Name;
+ Error_Msg_Name_1 := File.Project.Name;
Prj.Err.Error_Msg
(Flags, "{ is not a source of project %%",
- File.Location, Project);
+ File.Location, File.Project);
end if;
end if;
end;