aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par-util.adb
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2019-12-16 10:34:22 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-12-16 10:34:22 +0000
commit0bba838d7f4e9b851416d463d077b28aff0b561f (patch)
tree0cf75e351f183df935e1cfbea6da0358164e9618 /gcc/ada/par-util.adb
parent17a98a3dbb7f4c0d9d734bbc8890d94daa2aa4c9 (diff)
downloadgcc-0bba838d7f4e9b851416d463d077b28aff0b561f.zip
gcc-0bba838d7f4e9b851416d463d077b28aff0b561f.tar.gz
gcc-0bba838d7f4e9b851416d463d077b28aff0b561f.tar.bz2
[Ada] Syntax error on improperly indented imported subprogram
2019-12-16 Bob Duff <duff@adacore.com> gcc/ada/ * par.adb: Add Scopes function to do range checking on the scope stack. Call Scopes all over the parser. Add SIS_Aspect_Import_Seen flag. * par-ch6.adb (P_Subprogram): Initialize SIS_Aspect_Import_Seen to False at the start, and check it at the end. * par-ch13.adb (Get_Aspect_Specifications): Set SIS_Aspect_Import_Seen to True when appropriate. * par-ch10.adb, par-ch12.adb, par-ch2.adb, par-ch3.adb, par-ch5.adb, par-ch7.adb, par-ch9.adb, par-endh.adb, par-util.adb: Call Scopes. From-SVN: r279428
Diffstat (limited to 'gcc/ada/par-util.adb')
-rw-r--r--gcc/ada/par-util.adb10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/ada/par-util.adb b/gcc/ada/par-util.adb
index 7b93ffa..1c32a42 100644
--- a/gcc/ada/par-util.adb
+++ b/gcc/ada/par-util.adb
@@ -162,7 +162,7 @@ package body Util is
procedure Check_Bad_Layout is
begin
if RM_Column_Check and then Token_Is_At_Start_Of_Line
- and then Start_Column <= Scope.Table (Scope.Last).Ecol
+ and then Start_Column <= Scopes (Scope.Last).Ecol
then
Error_Msg_BC -- CODEFIX
("(style) incorrect layout");
@@ -668,9 +668,9 @@ package body Util is
Scope.Decrement_Last;
if Include_Subprogram_In_Messages
- and then Scope.Table (Scope.Last).Labl /= Error
+ and then Scopes (Scope.Last).Labl /= Error
then
- Current_Node := Scope.Table (Scope.Last).Labl;
+ Current_Node := Scopes (Scope.Last).Labl;
end if;
if Debug_Flag_P then
@@ -695,8 +695,8 @@ package body Util is
First_Non_Blank_Location);
end if;
- Scope.Table (Scope.Last).Junk := False;
- Scope.Table (Scope.Last).Node := Empty;
+ Scopes (Scope.Last).Junk := False;
+ Scopes (Scope.Last).Node := Empty;
if Debug_Flag_P then
Error_Msg_Uint_1 := UI_From_Int (Scope.Last);