diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-02 07:42:46 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-02 07:42:46 +0000 |
commit | 0d4fcd67a5366a3dab111f2ca46e583b7a4c879e (patch) | |
tree | 72abc89b907673e095c09bd0dd495a685a603aeb /gcc/ada/par.adb | |
parent | 3d573baccbd09b7863f2018042c5fc7e0319ea61 (diff) | |
download | ppe42-gcc-0d4fcd67a5366a3dab111f2ca46e583b7a4c879e.tar.gz ppe42-gcc-0d4fcd67a5366a3dab111f2ca46e583b7a4c879e.zip |
2011-08-02 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Minor reformatting.
* sem_prag.adb: Minor reformatting.
2011-08-02 Tristan Gingold <gingold@adacore.com>
* vms_data.ads: Add VMS qualifier for -gnateP.
2011-08-02 Robert Dewar <dewar@adacore.com>
* par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
* par-ch7.adb (P_Package): Proper placement of aspects for package
decl/instantiation.
* par-endh.adb (Check_End): Ad Is_Sloc parameter
(End_Statements): Add Is_Sloc parameterr
* par.adb (P_Aspect_Specification): New meaning of Decl = Empty
(Check_End): Ad Is_Sloc parameter
(End_Statements): Add Is_Sloc parameterr
2011-08-02 Vincent Celier <celier@adacore.com>
* ug_words: Add VMS qualifier equivalent to -gnateP:
/SYMBOL_PREPROCESSING.
2011-08-02 Jose Ruiz <ruiz@adacore.com>
* gnat-style.texi: For hexadecimal numeric literals the typical
grouping of digits is 4 to represent 2 bytes.
A procedure spec which is split into several lines is indented two
characters.
2011-08-02 Yannick Moy <moy@adacore.com>
* exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
* sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
(Resolve_Aggregate): issue errors in formal modes when aggregate is not
properly qualified
(Resolve_Array_Aggregate): issue errors in formal modes on non-static
choice in array aggregate
(Resolve_Extension_Aggregate): issue errors in formal modes on subtype
mark as ancestor
(Resolve_Record_Aggregate): issue errors in formal modes on mixed
positional and named aggregate for record, or others in record
aggregate, or multiple choice in record aggregate
* sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
array operands to logical operations AND, OR and XOR do not have the
same static lower and higher bounds
* sem_ch5.adb, sinfo.ads: Correct typos in comments
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177086 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/par.adb')
-rw-r--r-- | gcc/ada/par.adb | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/gcc/ada/par.adb b/gcc/ada/par.adb index 99f6806057d..4d3e379f938 100644 --- a/gcc/ada/par.adb +++ b/gcc/ada/par.adb @@ -870,7 +870,6 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is -- Semicolon is True, a terminating semicolon is also scanned. If this -- argument is False, the scan pointer is left pointing past the aspects -- and the caller must check for a proper terminator. - -- left pointing past the aspects, presumably pointing to a terminator. -- -- P_Aspect_Specification is called with the current token pointing to -- either a WITH keyword starting an aspect specification, or an @@ -880,9 +879,13 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is -- the given declaration node. A list of aspects is built and stored for -- this declaration node using a call to Set_Aspect_Specifications. If -- no WITH keyword is present, then this call has no effect other than - -- scanning out the terminator if it is a semicolon. If Decl is Error on - -- entry, any scanned aspect specifications are ignored and a message is - -- output saying aspect specifications not permitted here. + -- scanning out the terminator if it is a semicolon. + + -- If Decl is Error on entry, any scanned aspect specifications are + -- ignored and a message is output saying aspect specifications not + -- permitted here. If Decl is Empty, then scanned aspect specifications + -- are also ignored, but no error message is given (this is used when + -- the caller has already taken care of the error message). function P_Code_Statement (Subtype_Mark : Node_Id) return Node_Id; -- Function to parse a code statement. The caller has scanned out @@ -908,7 +911,9 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is -- Routines for handling end lines, including scope recovery package Endh is - function Check_End (Decl : Node_Id := Empty) return Boolean; + function Check_End + (Decl : Node_Id := Empty; + Is_Loc : Source_Ptr := No_Location) return Boolean; -- Called when an end sequence is required. In the absence of an error -- situation, Token contains Tok_End on entry, but in a missing end -- case, this may not be the case. Pop_End_Context is used to determine @@ -922,7 +927,15 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is -- -- If Decl is non-empty, then aspect specifications are permitted -- following the end, and Decl is the declaration node with which - -- these aspect specifications are to be associated. + -- these aspect specifications are to be associated. If Decl is empty, + -- then aspect specifications are not permitted and will generate an + -- error message. + -- + -- Is_Loc is set to other than the default only for the case of a + -- package declaration. It points to the IS keyword of the declaration, + -- and is used to specialize the error messages for misplaced aspect + -- specifications in this case. Note that Decl is always Empty if Is_Loc + -- is set. procedure End_Skip; -- Skip past an end sequence. On entry Token contains Tok_End, and we @@ -933,8 +946,9 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is -- error messages while carrying this out. procedure End_Statements - (Parent : Node_Id := Empty; - Decl : Node_Id := Empty); + (Parent : Node_Id := Empty; + Decl : Node_Id := Empty; + Is_Sloc : Source_Ptr := No_Location); -- Called when an end is required or expected to terminate a sequence -- of statements. The caller has already made an appropriate entry in -- the Scope.Table to describe the expected form of the end. This can @@ -945,6 +959,14 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is -- If Decl is non-null, then it is a declaration node, and aspect -- specifications are permitted after the end statement. These aspect -- specifications, if present, are stored in this declaration node. + -- If Decl is null, then aspect specifications are not permitted after + -- the end statement. + -- + -- In the case where Decl is null, Is_Sloc determines the handling. If + -- it is set to No_Location, then aspect specifications are ignored and + -- an error message is given. Is_Sloc is used in the package declaration + -- case to point to the IS, and is used to specialize the error emssages + -- issued in this case. end Endh; -------------- |