From dc3af7e24f15deaa9ea281be5f46b6f1aae1cbd4 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 6 Aug 2012 10:48:19 +0200 Subject: [multiple changes] 2012-08-06 Arnaud Charlet * prj-attr.adb (Register_New_Package): Add missing blank. 2012-08-06 Ed Schonberg * exp_aggr.adb (Is_Two_Dim_Packed_Array): New predicate, used when computing maximum size allowable to construct static aggregate. 2012-08-06 Vincent Pucci * freeze.adb (Freeze_Entity): Inherit_Aspects_At_Freeze_Point calls added for derived types and subtypes. * sem_aux.adb, sem_aux.ads (Get_Rep_Item, Get_Rep_Pragma, Has_Rep_Pragma): New routines. * sem_ch13.ads (Inherit_Aspects_At_Freeze_Point): New routine. * sem_ch13.adb (Analyze_Aspect_Specifications): Error message for aspect Lock_Free fixed. (Inherits_Aspects_At_Freeze_Point): New routine. * sem_ch3.adb: Several flag settings removed since inheritance of aspects must be performed at freeze point. 2012-08-06 Thomas Quinot * s-oscons-tmplt.c: Fix s-oscons.ads formatting on VxWorks. 2012-08-06 Vincent Pucci * sem_dim.adb (Analyze_Dimension_Binary_Op): Issue an error message for unknown exponent at compile-time. 2012-08-06 Gary Dismukes * sem_eval.ads (Compile_Time_Known_Value_Or_Aggr): Enhance comment to make it clear that the aggregate's evaluation might still involve run-time checks even though the aggregate is considered known at compile time. * sinfo.ads (Compile_Time_Known_Aggregate): Correct comment to refer to Exp_Aggr instead of Sem_Aggr. From-SVN: r190172 --- gcc/ada/sem_aux.ads | 66 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 6 deletions(-) (limited to 'gcc/ada/sem_aux.ads') diff --git a/gcc/ada/sem_aux.ads b/gcc/ada/sem_aux.ads index bf09e99..fafd70f 100644 --- a/gcc/ada/sem_aux.ads +++ b/gcc/ada/sem_aux.ads @@ -168,18 +168,47 @@ package Sem_Aux is -- otherwise Empty is returned. A special case is that when Nam is -- Name_Priority, the call will also find Interrupt_Priority. + function Get_Rep_Item + (E : Entity_Id; + Nam1 : Name_Id; + Nam2 : Name_Id; + Check_Parents : Boolean := True) return Node_Id; + -- Searches the Rep_Item chain for a given entity E, for an instance of a + -- rep item (pragma, attribute definition clause, or aspect specification) + -- whose name matches one of the given names Nam1 or Nam2. If Check_Parents + -- is False then it only returns rep item that has been directly specified + -- for E (and not inherited from its parents, if any). If one is found, it + -- is returned, otherwise Empty is returned. A special case is that when + -- one of the given names is Name_Priority, the call will also find + -- Interrupt_Priority. + function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id; Check_Parents : Boolean := True) return Node_Id; - -- Searches the Rep_Item chain for a given entity E, for an instance - -- of a representation pragma whose name matches the given name Nam. If + -- Searches the Rep_Item chain for a given entity E, for an instance of a + -- representation pragma whose name matches the given name Nam. If -- Check_Parents is False then it only returns representation pragma that -- has been directly specified for E (and not inherited from its parents, - -- if any). If one is found, it is returned, otherwise Empty is returned. A - -- special case is that when Nam is Name_Priority, the call will also find + -- if any). If one is found and if it is the first rep item in the list + -- that matches Nam, it is returned, otherwise Empty is returned. A special + -- case is that when Nam is Name_Priority, the call will also find -- Interrupt_Priority. + function Get_Rep_Pragma + (E : Entity_Id; + Nam1 : Name_Id; + Nam2 : Name_Id; + Check_Parents : Boolean := True) return Node_Id; + -- Searches the Rep_Item chain for a given entity E, for an instance of a + -- representation pragma whose name matches one of the given names Nam1 or + -- Nam2. If Check_Parents is False then it only returns representation + -- pragma that has been directly specified for E (and not inherited from + -- its parents, if any). If one is found and if it is the first rep item in + -- the list that matches one of the given names, it is returned, otherwise + -- Empty is returned. A special case is that when one of the given names is + -- Name_Priority, the call will also find Interrupt_Priority. + function Has_Rep_Item (E : Entity_Id; Nam : Name_Id; @@ -191,6 +220,18 @@ package Sem_Aux is -- from its parents, if any). If found then True is returned, otherwise -- False indicates that no matching entry was found. + function Has_Rep_Item + (E : Entity_Id; + Nam1 : Name_Id; + Nam2 : Name_Id; + Check_Parents : Boolean := True) return Boolean; + -- Searches the Rep_Item chain for the given entity E, for an instance of a + -- rep item (pragma, attribute definition clause, or aspect specification) + -- with the given names Nam1 or Nam2. If Check_Parents is False then it + -- only checks for a rep item that has been directly specified for E (and + -- not inherited from its parents, if any). If found then True is returned, + -- otherwise False indicates that no matching entry was found. + function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id; @@ -199,8 +240,21 @@ package Sem_Aux is -- representation pragma with the given name Nam. If Check_Parents is False -- then it only checks for a representation pragma that has been directly -- specified for E (and not inherited from its parents, if any). If found - -- then True is returned, otherwise False indicates that no matching entry - -- was found. + -- and if it is the first rep item in the list that matches Nam then True + -- is returned, otherwise False indicates that no matching entry was found. + + function Has_Rep_Pragma + (E : Entity_Id; + Nam1 : Name_Id; + Nam2 : Name_Id; + Check_Parents : Boolean := True) return Boolean; + -- Searches the Rep_Item chain for the given entity E, for an instance of a + -- representation pragma with the given names Nam1 or Nam2. If + -- Check_Parents is False then it only checks for a rep item that has been + -- directly specified for E (and not inherited from its parents, if any). + -- If found and if it is the first rep item in the list that matches one of + -- the given names then True is returned, otherwise False indicates that no + -- matching entry was found. function In_Generic_Body (Id : Entity_Id) return Boolean; -- Determine whether entity Id appears inside a generic body -- cgit v1.1