aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch2.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-04-25 11:12:31 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2017-04-25 11:12:31 +0200
commit94d3a18d33399c807647294c973f263096fae095 (patch)
tree241695fc84fc443f47ea6b65207c576a7bea745b /gcc/ada/par-ch2.adb
parent51148ddab1495aa357e57f1c209940f7cde571c1 (diff)
downloadgcc-94d3a18d33399c807647294c973f263096fae095.zip
gcc-94d3a18d33399c807647294c973f263096fae095.tar.gz
gcc-94d3a18d33399c807647294c973f263096fae095.tar.bz2
[multiple changes]
2017-04-25 Hristian Kirtchev <kirtchev@adacore.com> * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb, scn.adb, osint.adb, fname.adb: Minor reformatting. 2017-04-25 Pascal Obry <obry@adacore.com> * s-taprop-mingw.adb: Do not check for CloseHandle in Finalize_TCB. From-SVN: r247153
Diffstat (limited to 'gcc/ada/par-ch2.adb')
-rw-r--r--gcc/ada/par-ch2.adb48
1 files changed, 26 insertions, 22 deletions
diff --git a/gcc/ada/par-ch2.adb b/gcc/ada/par-ch2.adb
index cd79ac3..fc8d9cb 100644
--- a/gcc/ada/par-ch2.adb
+++ b/gcc/ada/par-ch2.adb
@@ -224,26 +224,6 @@ package body Ch2 is
-- in fact the bodies ARE present, supplied by these pragmas.
function P_Pragma (Skipping : Boolean := False) return Node_Id is
- Interface_Check_Required : Boolean := False;
- -- Set True if check of pragma INTERFACE is required
-
- Import_Check_Required : Boolean := False;
- -- Set True if check of pragma IMPORT is required
-
- Arg_Count : Nat := 0;
- -- Number of argument associations processed
-
- Identifier_Seen : Boolean := False;
- -- Set True if an identifier is encountered for a pragma argument. Used
- -- to check that there are no more arguments without identifiers.
-
- Prag_Node : Node_Id;
- Prag_Name : Name_Id;
- Semicolon_Loc : Source_Ptr;
- Ident_Node : Node_Id;
- Assoc_Node : Node_Id;
- Result : Node_Id;
-
procedure Skip_Pragma_Semicolon;
-- Skip past semicolon at end of pragma
@@ -265,6 +245,28 @@ package body Ch2 is
end if;
end Skip_Pragma_Semicolon;
+ -- Local variables
+
+ Interface_Check_Required : Boolean := False;
+ -- Set True if check of pragma INTERFACE is required
+
+ Import_Check_Required : Boolean := False;
+ -- Set True if check of pragma IMPORT is required
+
+ Arg_Count : Nat := 0;
+ -- Number of argument associations processed
+
+ Identifier_Seen : Boolean := False;
+ -- Set True if an identifier is encountered for a pragma argument. Used
+ -- to check that there are no more arguments without identifiers.
+
+ Assoc_Node : Node_Id;
+ Ident_Node : Node_Id;
+ Prag_Name : Name_Id;
+ Prag_Node : Node_Id;
+ Result : Node_Id;
+ Semicolon_Loc : Source_Ptr;
+
-- Start of processing for P_Pragma
begin
@@ -366,8 +368,8 @@ package body Ch2 is
-- Cancel indication of being within a pragma or in particular a Depends
-- pragma.
- Inside_Pragma := False;
Inside_Depends := False;
+ Inside_Pragma := False;
-- Now we have two tasks left, we need to scan out the semicolon
-- following the pragma, and we have to call Par.Prag to process
@@ -390,10 +392,12 @@ package body Ch2 is
Skip_Pragma_Semicolon;
return Par.Prag (Prag_Node, Semicolon_Loc);
end if;
+
exception
when Error_Resync =>
Resync_Past_Semicolon;
- Inside_Pragma := False;
+ Inside_Depends := False;
+ Inside_Pragma := False;
return Error;
end P_Pragma;