aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/switch-c.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-02-20 10:51:22 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2015-02-20 10:51:22 +0100
commit22efcab77ad9a19cae5e828a9bcfd4dba9ea02ec (patch)
tree4245838727a454159664e7cc0f0d5a35592fff1c /gcc/ada/switch-c.adb
parent17ce1f52fe78bfdc63dfe941a272a1ffdea605a7 (diff)
downloadgcc-22efcab77ad9a19cae5e828a9bcfd4dba9ea02ec.zip
gcc-22efcab77ad9a19cae5e828a9bcfd4dba9ea02ec.tar.gz
gcc-22efcab77ad9a19cae5e828a9bcfd4dba9ea02ec.tar.bz2
[multiple changes]
2015-02-20 Vincent Celier <celier@adacore.com> * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS= is specified several times with different values that indicates the same runtime directory. 2015-02-20 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to handle properly illegal uses of attributes on prefixes on an incomplete type, both when the type of the prefix is locally incomplete, and when it is a limited view of a type whose non-limited view is not available. (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for 'Address and others. 2015-02-20 Eric Botcazou <ebotcazou@adacore.com> * exp_ch6.adb: Fix minor typo in comment. From-SVN: r220843
Diffstat (limited to 'gcc/ada/switch-c.adb')
-rw-r--r--gcc/ada/switch-c.adb25
1 files changed, 12 insertions, 13 deletions
diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb
index 46939c6..c3b5733 100644
--- a/gcc/ada/switch-c.adb
+++ b/gcc/ada/switch-c.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2015, 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- --
@@ -229,17 +229,6 @@ package body Switch.C is
new String'(Switch_Chars (Ptr + 4 .. Max));
end if;
- -- Check that this is the first time --RTS is specified
- -- or if it is not the first time, the same path has been
- -- specified.
-
- if RTS_Specified = null then
- RTS_Specified := Runtime_Dir;
-
- elsif RTS_Specified.all /= Runtime_Dir.all then
- Osint.Fail ("--RTS cannot be specified multiple times");
- end if;
-
-- Valid --RTS switch
Opt.No_Stdinc := True;
@@ -251,13 +240,23 @@ package body Switch.C is
RTS_Lib_Path_Name :=
Get_RTS_Search_Dir (Runtime_Dir.all, Objects);
- if RTS_Src_Path_Name /= null
+ if RTS_Specified /= null then
+ if RTS_Src_Path_Name = null
+ or else RTS_Lib_Path_Name = null
+ or else RTS_Specified.all /= RTS_Lib_Path_Name.all
+ then
+ Osint.Fail
+ ("--RTS cannot be specified multiple times");
+ end if;
+
+ elsif RTS_Src_Path_Name /= null
and then RTS_Lib_Path_Name /= null
then
-- Store the -fRTS switch (Note: Store_Compilation_Switch
-- changes -fRTS back into --RTS for the actual output).
Store_Compilation_Switch (Switch_Chars);
+ RTS_Specified := new String'(RTS_Lib_Path_Name.all);
elsif RTS_Src_Path_Name = null
and then RTS_Lib_Path_Name = null