aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gnatcmd.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/gnatcmd.adb')
-rw-r--r--gcc/ada/gnatcmd.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
index 55f79c3..8dadc9c 100644
--- a/gcc/ada/gnatcmd.adb
+++ b/gcc/ada/gnatcmd.adb
@@ -394,7 +394,7 @@ begin
begin
-- Check if an argument file is specified
- if The_Arg (The_Arg'First) = '@' then
+ if The_Arg'Length > 0 and then The_Arg (The_Arg'First) = '@' then
declare
Arg_File : Ada.Text_IO.File_Type;
Line : String (1 .. 256);
@@ -432,7 +432,7 @@ begin
Close (Arg_File);
end;
- else
+ elsif The_Arg'Length > 0 then
-- It is not an argument file; just put the argument in
-- the Last_Switches table.