diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-08-04 14:58:06 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-08-04 14:58:06 +0200 |
commit | 69fff50e08365770deca864efd7a904ac9eb25e0 (patch) | |
tree | a54cb3b7846c90023e478f75bdca955a38b9297e /gcc/ada/exp_ch3.adb | |
parent | e85f4337c3c9ced8e7eece753962443d230b487f (diff) | |
download | gcc-69fff50e08365770deca864efd7a904ac9eb25e0.zip gcc-69fff50e08365770deca864efd7a904ac9eb25e0.tar.gz gcc-69fff50e08365770deca864efd7a904ac9eb25e0.tar.bz2 |
[multiple changes]
2014-08-04 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
subtype indication and the case statement has only two choices,
replace subtype indication with its range, because the resulting
membership test cannot have a subtype indication as an operand.
2014-08-04 Arnaud Charlet <charlet@adacore.com>
* exp_ch3.adb: Update comments, minor reformatting.
From-SVN: r213583
Diffstat (limited to 'gcc/ada/exp_ch3.adb')
-rw-r--r-- | gcc/ada/exp_ch3.adb | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 5e11962..2f21d48 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -4570,8 +4570,8 @@ package body Exp_Ch3 is begin -- Expand_Record_Extension is called directly from the semantics, so - -- we must check to see whether expansion is active before proceeding - -- Because this affects the visibility of selected components in bodies + -- we must check to see whether expansion is active before proceeding, + -- because this affects the visibility of selected components in bodies -- of instances. if not Expander_Active then @@ -4686,9 +4686,7 @@ package body Exp_Ch3 is -- record parameter for an entry declaration. No master is created -- for such a type. - if Comes_From_Source (N) - and then Has_Task (Desig_Typ) - then + if Comes_From_Source (N) and then Has_Task (Desig_Typ) then Build_Master_Entity (Ptr_Typ); Build_Master_Renaming (Ptr_Typ); @@ -5743,8 +5741,7 @@ package body Exp_Ch3 is -- allocated in place, delay checks until assignments are -- made, because the discriminants are not initialized. - if Nkind (Expr) = N_Allocator - and then No_Initialization (Expr) + if Nkind (Expr) = N_Allocator and then No_Initialization (Expr) then null; @@ -7134,9 +7131,8 @@ package body Exp_Ch3 is -- routine. There is no need to add predefined primitives of interfaces -- because all their predefined primitives are abstract. - if Is_Tagged_Type (Def_Id) - and then not Is_Interface (Def_Id) - then + if Is_Tagged_Type (Def_Id) and then not Is_Interface (Def_Id) then + -- Do not add the body of predefined primitives in case of CPP tagged -- type derivations that have convention CPP. @@ -7990,10 +7986,9 @@ package body Exp_Ch3 is end if; -- The final expression is obtained by doing an unchecked conversion - -- of this result to the base type of the required subtype. We use - -- the base type to prevent the unchecked conversion from chopping - -- bits, and then we set Kill_Range_Check to preserve the "bad" - -- value. + -- of this result to the base type of the required subtype. Use the + -- base type to prevent the unchecked conversion from chopping bits, + -- and then we set Kill_Range_Check to preserve the "bad" value. Result := Unchecked_Convert_To (Base_Type (T), Val); |