summaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch3.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-20 11:45:37 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-20 11:45:37 +0000
commit11cf765a9e4de6db6b53030bee7fe02e29661e0f (patch)
treebedcacb1215b216aea495929bdf26289a76958ee /gcc/ada/par-ch3.adb
parent0bed14c86cb072b8c3c13447009ce11415ba2d9b (diff)
downloadgcc-11cf765a9e4de6db6b53030bee7fe02e29661e0f.tar.gz
2015-10-20 Bob Duff <duff@adacore.com>
* a-cobove.adb (Set_Length): Restore previous logic, but with "Checks and then" on the check. 2015-10-20 Ed Schonberg <schonberg@adacore.com> * par-ch3.adb (P_Known_Discriminant_Part_Opt): Handle properly a misplaced "constant" keyword in a discriminant specification. 2015-10-20 Steve Baird <baird@adacore.com> * einfo.ads (Is_Param_Block_Component_Type): New function decl for querying the flag. (Set_Is_Param_Block_Component_Type): New procedure decl for setting the flag. * einfo.adb (Is_Param_Block_Component_Type): New function body. (Set_Is_Param_Block_Component_Type): New procedure body. (Write_Entity_Flags): Display the new flag. * exp_ch9.adb (Build_Parameter_Block): Set flag on parameter block component types. (Expand_N_Entry_Declaration): Set flag on parameter block component types. 2015-10-20 Steve Baird <baird@adacore.com> * sem_elab.adb: Do not pass an N_Attribute_Reference node to Sinfo.Set_No_Elaboration_Check. * sem_elab.adb (Check_Elab_Call) Do not pass a non-call node (specifically, an N_Attribute_Reference node) to Sinfo.Set_No_Elaboration_Check. 2015-10-20 Tristan Gingold <gingold@adacore.com> * adaint.c: File names are case sensitive on aarch64-ios. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229051 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/par-ch3.adb')
-rw-r--r--gcc/ada/par-ch3.adb17
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb
index 86b2a6d295c..308808bd4dd 100644
--- a/gcc/ada/par-ch3.adb
+++ b/gcc/ada/par-ch3.adb
@@ -3030,8 +3030,23 @@ package body Ch3 is
Set_Discriminant_Type
(Specification_Node,
P_Access_Definition (Not_Null_Present));
- else
+ -- Catch ouf-of-order keywords
+
+ elsif Token = Tok_Constant then
+ Scan;
+
+ if Token = Tok_Access then
+ Error_Msg_SC ("CONSTANT must appear after ACCESS");
+ Set_Discriminant_Type
+ (Specification_Node,
+ P_Access_Definition (Not_Null_Present));
+
+ else
+ Error_Msg_SC ("misplaced CONSTANT");
+ end if;
+
+ else
Set_Discriminant_Type
(Specification_Node, P_Subtype_Mark);
No_Constraint;