summaryrefslogtreecommitdiff
path: root/gcc/ada/par-endh.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/par-endh.adb')
-rw-r--r--gcc/ada/par-endh.adb15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ada/par-endh.adb b/gcc/ada/par-endh.adb
index 4200889f4c1..a6d5297799a 100644
--- a/gcc/ada/par-endh.adb
+++ b/gcc/ada/par-endh.adb
@@ -219,6 +219,10 @@ package body Endh is
End_Type := E_Record;
Scan; -- past RECORD
+ elsif Token = Tok_Return then
+ End_Type := E_Return;
+ Scan; -- past RETURN
+
elsif Token = Tok_Select then
End_Type := E_Select;
Scan; -- past SELECT
@@ -800,6 +804,9 @@ package body Endh is
elsif End_Type = E_Record then
Error_Msg_SC ("no RECORD for this `END RECORD`!");
+ elsif End_Type = E_Return then
+ Error_Msg_SC ("no RETURN for this `END RETURN`!");
+
elsif End_Type = E_Select then
Error_Msg_SC ("no SELECT for this `END SELECT`!");
@@ -859,6 +866,10 @@ package body Endh is
Error_Msg_SC
("`END RECORD;` expected@ for RECORD#!");
+ elsif End_Type = E_Return then
+ Error_Msg_SC
+ ("`END RETURN;` expected@ for RETURN#!");
+
elsif End_Type = E_Select then
Error_Msg_SC
("`END SELECT;` expected@ for SELECT#!");
@@ -924,6 +935,10 @@ package body Endh is
Error_Msg_SC
("missing `END RECORD;` for RECORD#!");
+ elsif End_Type = E_Return then
+ Error_Msg_SC
+ ("missing `END RETURN;` for RETURN#!");
+
elsif End_Type = E_Select then
Error_Msg_BC
("missing `END SELECT;` for SELECT#!");