summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-16 08:44:23 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-16 08:44:23 +0000
commit8d7b0e98ff4182cb76ff70a462d80a0fc82620da (patch)
treea931a367716028735a3b3db029460a62fbf544c2
parent5619d006aa999e394c2628c96093b1ab20f26834 (diff)
downloadppe42-gcc-8d7b0e98ff4182cb76ff70a462d80a0fc82620da.tar.gz
ppe42-gcc-8d7b0e98ff4182cb76ff70a462d80a0fc82620da.zip
2005-06-14 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Suffix_For): Change default suffix for C++ to ".cpp" (Check_Stand_Alone_Library): If the specified reference symbol file does not exist, only issue a warning when the symbol policy is not Controlled. And, when symbol policy is Compliant, set the symbol policy to Autonomous. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101053 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/prj-nmsc.adb33
1 files changed, 28 insertions, 5 deletions
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index fcdaf67c251..8feea85b3c8 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -2460,10 +2460,33 @@ package body Prj.Nmsc is
Get_Name_String (Lib_Ref_Symbol_File.Value))
then
Error_Msg_Name_1 := Lib_Ref_Symbol_File.Value;
- Error_Msg
- (Project, In_Tree,
- "library reference symbol file { does not exist",
- Lib_Ref_Symbol_File.Location);
+
+ -- For controlled symbol policy, it is an error
+ -- if the reference symbol file does not exist.
+
+ if Data.Symbol_Data.Symbol_Policy = Controlled then
+ Error_Msg
+ (Project, In_Tree,
+ "library reference symbol file { does not exist",
+ Lib_Ref_Symbol_File.Location);
+
+ else
+ -- For other symbol policies, this is just a warning
+
+ Error_Msg
+ (Project, In_Tree,
+ "?library reference symbol file { does not exist",
+ Lib_Ref_Symbol_File.Location);
+
+ -- In addition, if symbol policy is Compliant, it is
+ -- changed to Autonomous, because there is no reference
+ -- to check against, and we don't want to fail in this
+ -- case.
+
+ if Data.Symbol_Data.Symbol_Policy = Compliant then
+ Data.Symbol_Data.Symbol_Policy := Autonomous;
+ end if;
+ end if;
end if;
end if;
@@ -5069,7 +5092,7 @@ package body Prj.Nmsc is
Add_Str_To_Name_Buffer (".c");
when C_Plus_Plus_Language_Index =>
- Add_Str_To_Name_Buffer (".cc");
+ Add_Str_To_Name_Buffer (".cpp");
when others =>
return No_Name;
OpenPOWER on IntegriCloud