diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-02 12:14:09 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-02 12:14:09 +0200 |
commit | d8b962d80e8388a84aec13593b8b169446c547cb (patch) | |
tree | 36460c0e6a9af89bf4c30fcf1ece854d4e7f43aa /gcc/ada/par-ch3.adb | |
parent | f96b2d8594d3ae2352d7f8356336b1411ba14e3b (diff) | |
download | gcc-d8b962d80e8388a84aec13593b8b169446c547cb.zip gcc-d8b962d80e8388a84aec13593b8b169446c547cb.tar.gz gcc-d8b962d80e8388a84aec13593b8b169446c547cb.tar.bz2 |
[multiple changes]
2011-08-02 Robert Dewar <dewar@adacore.com>
* einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
(Base_Type): Now uses improved Is_Base_Type function
* einfo.ads (Base_Type): Inline this function
2011-08-02 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
(Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
2011-08-02 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Make-lang.in: Update dependencies.
* gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
targets.
2011-08-02 Yannick Moy <moy@adacore.com>
* par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
non-simple expression used in delta constraint
(P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
index constraint which is not a subtype mark
* par.adb: With and use Restrict
* sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
mode on component type which is not a subtype mark and default
expression on component
(Analyze_Subtype_Declaration): issue an error in formal mode on subtype
of string which does not have a lower index bound equal to 1
(Array_Type_Declaration): issue an error in formal mode on index or
component type which is not a subtype mark, and on aliased keyword on
component
(Derived_Type_Declaration): issue an error in formal mode on interface,
limited or abstract type
(Record_Type_Declaration): issue an error in formal mode on interface
(Record_Type_Definition): issue an error in formal mode on tagged types
and type extensions not declared in the specification of a library unit
package; on null non-tagged record; on variant part
2011-08-02 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
not declared for qualified library project when Library_Name is not
declared, but Library_Dir is.
2011-08-02 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
pragmas (affects aspects [Component_]Default_Value
(Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
component type for the resolution
From-SVN: r177123
Diffstat (limited to 'gcc/ada/par-ch3.adb')
-rw-r--r-- | gcc/ada/par-ch3.adb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb index 89617e6..32d9aa7 100644 --- a/gcc/ada/par-ch3.adb +++ b/gcc/ada/par-ch3.adb @@ -2528,6 +2528,7 @@ package body Ch3 is -- Note: this is an obsolescent feature in Ada 95 (I.3) -- Note: in Ada 83, the EXPRESSION must be a SIMPLE_EXPRESSION + -- (also true in formal modes). -- The caller has checked that the initial token is DELTA @@ -2542,6 +2543,12 @@ package body Ch3 is Scan; -- past DELTA Expr_Node := P_Expression; Check_Simple_Expression_In_Ada_83 (Expr_Node); + + if Expr_Form = EF_Non_Simple then + Check_Formal_Restriction + ("this expression must be parenthesized", Expr_Node); + end if; + Set_Delta_Expression (Constraint_Node, Expr_Node); if Token = Tok_Range then @@ -3069,6 +3076,12 @@ package body Ch3 is Expr_Node := P_Expression_Or_Range_Attribute; + if Expr_Form /= EF_Simple_Name + and then Formal_Verification_Mode + then + Error_Msg_SC ("|~~subtype mark required"); + end if; + if Expr_Form = EF_Range_Attr then Append (Expr_Node, Constr_List); |