summaryrefslogtreecommitdiff
path: root/gcc/ada/set_targ.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-11 13:30:34 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-11 13:30:34 +0000
commitc6fa96daa4355ed789f5602f4f3d388df6fc4e3f (patch)
treee298a7c6060e05952e462afd584372d0e59fb0f4 /gcc/ada/set_targ.adb
parent8e599fc2d88c9d4c62032616869e385cab171546 (diff)
downloadgcc-c6fa96daa4355ed789f5602f4f3d388df6fc4e3f.tar.gz
2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
* ttypes.ads, get_targ.ads: More minor rewording of comments. 2013-04-11 Johannes Kanig <kanig@adacore.com> * debug.adb: Document use of switch -gnatd.Z. 2013-04-11 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Pragma): Both pragma Depends and Global can now support renamings of entire objects. Legal renamings are replaced by the object they rename. (Is_Renaming): New routine. 2013-04-11 Yannick Moy <moy@adacore.com> * set_targ.adb, opt.ads: Minor changes in comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197795 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/set_targ.adb')
-rwxr-xr-xgcc/ada/set_targ.adb24
1 files changed, 15 insertions, 9 deletions
diff --git a/gcc/ada/set_targ.adb b/gcc/ada/set_targ.adb
index 90e83a68e86..bc8cf674fcf 100755
--- a/gcc/ada/set_targ.adb
+++ b/gcc/ada/set_targ.adb
@@ -470,8 +470,8 @@ package body Set_Targ is
begin
-- First step: see if the -gnateT switch is present. As we have noted,
-- this has to be done very early, so can not depend on the normal circuit
- -- for reading switches and setting switches in opt. The following code
- -- will set Opt.Target_Dependent_Info_Read if an option starting -gnatet
+ -- for reading switches and setting switches in Opt. The following code
+ -- will set Opt.Target_Dependent_Info_Read if an option starting -gnateT
-- is present in the options string.
declare
@@ -494,6 +494,12 @@ begin
declare
Argv_Ptr : constant Big_String_Ptr := save_argv (Arg);
begin
+
+ -- ??? Is there no problem accessing at indices 1 to 7 or 8
+ -- without first checking if the length of the underlying string
+ -- may be smaller? See back_end.adb for an example where function
+ -- Len_Arg is used to retrieve this length.
+
if Argv_Ptr (1 .. 7) = "-gnateT" then
Opt.Target_Dependent_Info_Read := True;
elsif Argv_Ptr (1 .. 8) = "-gnatd.b" then
@@ -507,7 +513,7 @@ begin
if not Opt.Target_Dependent_Info_Read then
- -- Set values set by direct calls to the back end
+ -- Set values by direct calls to the back end
Bits_BE := Get_Bits_BE;
Bits_Per_Unit := Get_Bits_Per_Unit;
@@ -536,13 +542,13 @@ begin
Register_Back_End_Types (Register_Float_Type'Access);
- -- Case of reading the target dependent values from target.atp
+ -- Case of reading the target dependent values from target.atp
- -- This is bit more complex than might be expected, because it has to
- -- be done very early. All kinds of packages depend on these values,
- -- and we can't wait till the normal processing of reading command line
- -- switches etc to read the file. We do this at the System.OS_Lib level
- -- since it is too early to be using Osint directly.
+ -- This is bit more complex than might be expected, because it has to be
+ -- done very early. All kinds of packages depend on these values, and we
+ -- can't wait till the normal processing of reading command line switches
+ -- etc to read the file. We do this at the System.OS_Lib level since it is
+ -- too early to be using Osint directly.
else
Read_File : declare