diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-04-02 12:51:58 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-04-02 12:51:58 +0200 |
commit | cf5ba8a881c32483bc11e05cc1ee3bcc990d32c6 (patch) | |
tree | 168cc4772edea64b02c164aad0c4c50eb0e7c6fe /gcc/ada/sem_util.adb | |
parent | 5bd5034e244983cb1d6655a759efafcd5b6287aa (diff) | |
download | gcc-cf5ba8a881c32483bc11e05cc1ee3bcc990d32c6.zip gcc-cf5ba8a881c32483bc11e05cc1ee3bcc990d32c6.tar.gz gcc-cf5ba8a881c32483bc11e05cc1ee3bcc990d32c6.tar.bz2 |
[multiple changes]
2012-04-02 Robert Dewar <dewar@adacore.com>
* s-atopri.ads: Minor reformatting.
2012-04-02 Thomas Quinot <quinot@adacore.com>
* sem_util.adb: Minor reformatting, minor code cleanup.
2012-04-02 Ed Schonberg <schonberg@adacore.com>
* lib-xref.adb (Generate_Reference): For a reference to an
operator symbol, set the sloc to point to the first character
of the operator name, and not to the initial quaote.
(Output_References): Ditto for the definition of an operator
symbol.
2012-04-02 Vincent Celier <celier@adacore.com>
* ali.adb (Scan_Ali): Recognize Z lines. Set
Implicit_With_From_Instantiation to True in the With_Record for
Z lines.
* ali.ads (With_Record): New Boolean component
Implicit_With_From_Instantiation, defaulted to False.
* csinfo.adb: Indicate that Implicit_With_From_Instantiation
is special
* lib-writ.adb (Write_ALI): New array Implicit_With.
(Collect_Withs): Set Implicit_With for the unit is it is not Yes.
(Write_With_Lines): Write a Z line instead of a W line if
Implicit_With is Yes for the unit.
* sem_ch12.adb (Inherit_Context): Only add a unit in the context
if it is not there yet.
* sinfo.ads: New flag Implicit_With_From_Instantiation (Flag12)
added.
From-SVN: r186079
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r-- | gcc/ada/sem_util.adb | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index b8e4d81..b525517 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -752,11 +752,10 @@ package body Sem_Util is Bas := Base_Type (T); - -- If T is non-private but its base type is private, this is - -- the completion of a subtype declaration whose parent type - -- is private (see Complete_Private_Subtype in sem_ch3). The - -- proper discriminants are to be found in the full view of - -- the base. + -- If T is non-private but its base type is private, this is the + -- completion of a subtype declaration whose parent type is private + -- (see Complete_Private_Subtype in Sem_Ch3). The proper discriminants + -- are to be found in the full view of the base. if Is_Private_Type (Bas) and then Present (Full_View (Bas)) then Bas := Full_View (Bas); @@ -783,10 +782,10 @@ package body Sem_Util is Decl := Make_Subtype_Declaration (Loc, Defining_Identifier => Act, - Subtype_Indication => + Subtype_Indication => Make_Subtype_Indication (Loc, Subtype_Mark => New_Occurrence_Of (Bas, Loc), - Constraint => + Constraint => Make_Index_Or_Discriminant_Constraint (Loc, Constraints => Constraints))); @@ -813,8 +812,8 @@ package body Sem_Util is -- of the prefix. function Build_Discriminal_Record_Constraint return List_Id; - -- Similar to previous one, for discriminated components constrained - -- by the discriminant of the enclosing object. + -- Similar to previous one, for discriminated components constrained by + -- the discriminant of the enclosing object. ---------------------------------------- -- Build_Discriminal_Array_Constraint -- @@ -970,12 +969,7 @@ package body Sem_Util is -- and thus will not have the unit name automatically prepended. Set_Package_Name (Spec_Id); - - -- Append _E - - Name_Buffer (Name_Len + 1) := '_'; - Name_Buffer (Name_Len + 2) := 'E'; - Name_Len := Name_Len + 2; + Add_Str_To_Name_Buffer ("_E"); -- Create elaboration counter @@ -1001,9 +995,9 @@ package body Sem_Util is Set_Current_Value (Elab_Ent, Empty); Set_Last_Assignment (Elab_Ent, Empty); - -- We do not want any further qualification of the name (if we did - -- not do this, we would pick up the name of the generic package - -- in the case of a library level generic instantiation). + -- We do not want any further qualification of the name (if we did not + -- do this, we would pick up the name of the generic package in the case + -- of a library level generic instantiation). Set_Has_Qualified_Name (Elab_Ent); Set_Has_Fully_Qualified_Name (Elab_Ent); @@ -1088,8 +1082,7 @@ package body Sem_Util is then return False; else - return - Cannot_Raise_Constraint_Error (Expression (Expr)); + return Cannot_Raise_Constraint_Error (Expression (Expr)); end if; when N_Unchecked_Type_Conversion => @@ -1099,8 +1092,7 @@ package body Sem_Util is if Do_Overflow_Check (Expr) then return False; else - return - Cannot_Raise_Constraint_Error (Right_Opnd (Expr)); + return Cannot_Raise_Constraint_Error (Right_Opnd (Expr)); end if; when N_Op_Divide | @@ -1157,8 +1149,7 @@ package body Sem_Util is -- Check_Implicit_Dereference -- -------------------------------- - procedure Check_Implicit_Dereference (Nam : Node_Id; Typ : Entity_Id) - is + procedure Check_Implicit_Dereference (Nam : Node_Id; Typ : Entity_Id) is Disc : Entity_Id; Desig : Entity_Id; |