diff options
Diffstat (limited to 'gcc/ada/par.adb')
-rw-r--r-- | gcc/ada/par.adb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ada/par.adb b/gcc/ada/par.adb index 5ecce52..5399e2b 100644 --- a/gcc/ada/par.adb +++ b/gcc/ada/par.adb @@ -6,9 +6,9 @@ -- -- -- B o d y -- -- -- --- $Revision: 1.2 $ +-- $Revision$ -- -- --- Copyright (C) 1992-2001 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2002 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -974,7 +974,12 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is -- of implementation defined pragmas. The second parameter records the -- location of the semicolon following the pragma (this is needed for -- correct processing of the List and Page pragmas). The returned value - -- is a copy of Pragma_Node, or Error if an error is found. + -- is a copy of Pragma_Node, or Error if an error is found. Note that + -- at the point where Prag is called, the right paren ending the pragma + -- has been scanned out, and except in the case of pragma Style_Checks, + -- so has the following semicolon. For Style_Checks, the caller delays + -- the scanning of the semicolon so that it will be scanned using the + -- settings from the Style_Checks pragma preceding it. ------------------------- -- Subsidiary Routines -- @@ -1054,7 +1059,7 @@ begin if Configuration_Pragmas then declare - Ecount : constant Int := Errors_Detected; + Ecount : constant Int := Total_Errors_Detected; Pragmas : List_Id := Empty_List; P_Node : Node_Id; @@ -1070,7 +1075,7 @@ begin else P_Node := P_Pragma; - if Errors_Detected > Ecount then + if Total_Errors_Detected > Ecount then return Error_List; end if; |