summaryrefslogtreecommitdiffstats
path: root/gcc/ada/prj-strt.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/prj-strt.adb')
-rw-r--r--gcc/ada/prj-strt.adb6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/prj-strt.adb b/gcc/ada/prj-strt.adb
index 8dade507915..cc1bd83db80 100644
--- a/gcc/ada/prj-strt.adb
+++ b/gcc/ada/prj-strt.adb
@@ -1205,6 +1205,8 @@ package body Prj.Strt is
Scan;
+ -- Check for possible index expression
+
if Token = Tok_At then
if not Optional_Index then
Error_Msg ("index not allowed here", Token_Ptr);
@@ -1214,6 +1216,8 @@ package body Prj.Strt is
Scan;
end if;
+ -- Set the index value
+
else
Scan;
Expect (Tok_Integer_Literal, "integer literal");
@@ -1224,9 +1228,7 @@ package body Prj.Strt is
begin
if Index = 0 then
Error_Msg ("index cannot be zero", Token_Ptr);
-
else
- -- Set the index
Set_Source_Index_Of (Term_Id, To => Index);
end if;
end;
OpenPOWER on IntegriCloud