aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch3.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2014-07-30 15:13:23 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2014-07-30 17:13:23 +0200
commit45ec05e18a67b030cfc64802c9261b7ba2e7d34c (patch)
treee9d7f87f40d20e633debaafad695d3cb50b3a33b /gcc/ada/exp_ch3.adb
parentad9560ea432c33bdcfdeb5ed16cdb411ced11fbc (diff)
downloadgcc-45ec05e18a67b030cfc64802c9261b7ba2e7d34c.zip
gcc-45ec05e18a67b030cfc64802c9261b7ba2e7d34c.tar.gz
gcc-45ec05e18a67b030cfc64802c9261b7ba2e7d34c.tar.bz2
gnat_ugn.texi: Minor spelling correction.
2014-07-30 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Minor spelling correction. * makeutl.adb: Minor code reorganization. * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting. 2014-07-30 Robert Dewar <dewar@adacore.com> * einfo.ads (Has_Unchecked_Union): Document that this is used to check for illegal Valid_Scalars attribute references. * exp_attr.adb (Build_Record_VS_Func): New function (Expand_N_Attribute_Reference, case Valid_Scalars): Call this function. * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to Unchecked_Union Add note on 'Valid_Scalars generating a lot of code. * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give error on attempt to apply Valid_Scalars to Unchecked_Union type. From-SVN: r213298
Diffstat (limited to 'gcc/ada/exp_ch3.adb')
-rw-r--r--gcc/ada/exp_ch3.adb29
1 files changed, 11 insertions, 18 deletions
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index c928247..6533db2 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -147,7 +147,7 @@ package body Exp_Ch3 is
-- The resulting operation is a TSS subprogram.
procedure Build_Variant_Record_Equality (Typ : Entity_Id);
- -- Create An Equality function for the non-tagged variant record 'Typ'
+ -- Create An Equality function for the non-tagged variant record Typ
-- and attach it to the TSS list
procedure Check_Stream_Attributes (Typ : Entity_Id);
@@ -442,9 +442,7 @@ package body Exp_Ch3 is
Ctyp := Etype (Comp);
- if not Is_Array_Type (Ctyp)
- or else Number_Dimensions (Ctyp) > 1
- then
+ if not Is_Array_Type (Ctyp) or else Number_Dimensions (Ctyp) > 1 then
goto Continue;
end if;
@@ -4279,9 +4277,9 @@ package body Exp_Ch3 is
end if;
end Build_Untagged_Equality;
- ------------------------------------
+ -----------------------------------
-- Build_Variant_Record_Equality --
- ------------------------------------
+ -----------------------------------
-- Generates:
@@ -4289,13 +4287,13 @@ package body Exp_Ch3 is
-- begin
-- -- Compare discriminants
- -- if False or else X.D1 /= Y.D1 or else X.D2 /= Y.D2 then
+ -- if X.D1 /= Y.D1 or else X.D2 /= Y.D2 or else ... then
-- return False;
-- end if;
-- -- Compare components
- -- if False or else X.C1 /= Y.C1 or else X.C2 /= Y.C2 then
+ -- if X.C1 /= Y.C1 or else X.C2 /= Y.C2 or else ... then
-- return False;
-- end if;
@@ -4303,12 +4301,12 @@ package body Exp_Ch3 is
-- case X.D1 is
-- when V1 =>
- -- if False or else X.C2 /= Y.C2 or else X.C3 /= Y.C3 then
+ -- if X.C2 /= Y.C2 or else X.C3 /= Y.C3 or else ... then
-- return False;
-- end if;
-- ...
-- when Vn =>
- -- if False or else X.Cn /= Y.Cn then
+ -- if X.Cn /= Y.Cn or else ... then
-- return False;
-- end if;
-- end case;
@@ -4323,13 +4321,8 @@ package body Exp_Ch3 is
Make_Defining_Identifier (Loc,
Chars => Make_TSS_Name (Typ, TSS_Composite_Equality));
- X : constant Entity_Id :=
- Make_Defining_Identifier (Loc,
- Chars => Name_X);
-
- Y : constant Entity_Id :=
- Make_Defining_Identifier (Loc,
- Chars => Name_Y);
+ X : constant Entity_Id := Make_Defining_Identifier (Loc, Name_X);
+ Y : constant Entity_Id := Make_Defining_Identifier (Loc, Name_Y);
Def : constant Node_Id := Parent (Typ);
Comps : constant Node_Id := Component_List (Type_Definition (Def));
@@ -4357,7 +4350,6 @@ package body Exp_Ch3 is
declare
Parent_Eq : constant Entity_Id :=
TSS (Root_Type (Typ), TSS_Composite_Equality);
-
begin
if Present (Parent_Eq) then
Copy_TSS (Parent_Eq, Typ);
@@ -8805,6 +8797,7 @@ package body Exp_Ch3 is
------------------
-- <Make_Eq_If shared components>
+
-- case X.D1 is
-- when V1 => <Make_Eq_Case> on subcomponents
-- ...