[FYI,Ada] reenable ada83 library unit renaming error
Commit Message
The condition of the 'if' encompassed that of the 'elsif', so the error
message wouldn't get a chance to be printed.
Regstrapped on x86_64-linux-gnu. I'm checking this in.
for gcc/ada/ChangeLog
* par-ch10.adb (P_Compilation_Unit): Reenable ada83 library
unit renaming test and error.
---
gcc/ada/par-ch10.adb | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
@@ -532,13 +532,14 @@ package body Ch10 is
| N_Subprogram_Body
| N_Subprogram_Renaming_Declaration
then
- Unit_Node := Specification (Unit_Node);
-
- elsif Nkind (Unit_Node) = N_Subprogram_Renaming_Declaration then
- if Ada_Version = Ada_83 then
+ if Nkind (Unit_Node) = N_Subprogram_Renaming_Declaration
+ and then Ada_Version = Ada_83
+ then
Error_Msg_N
("(Ada 83) library unit renaming not allowed", Unit_Node);
end if;
+
+ Unit_Node := Specification (Unit_Node);
end if;
if Nkind (Unit_Node) in N_Task_Body