diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-10-02 14:16:17 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-10-02 14:16:17 +0200 |
commit | c9a6b38f011c8ea884800662ee567910251a57d2 (patch) | |
tree | bba7d9a5ccb0b3ff25add60455dd4928bd9186f1 /gcc/ada | |
parent | f563ce55854c93f9a2b7075d5f84fc6301d41c30 (diff) | |
download | gcc-c9a6b38f011c8ea884800662ee567910251a57d2.zip gcc-c9a6b38f011c8ea884800662ee567910251a57d2.tar.gz gcc-c9a6b38f011c8ea884800662ee567910251a57d2.tar.bz2 |
[multiple changes]
2012-10-02 Eric Botcazou <ebotcazou@adacore.com>
* types.h: Minor cosmetic fix.
2012-10-02 Robert Dewar <dewar@adacore.com>
* sinfo.ads: Remove refs of N_Conditional_Expression and
N_Parameterized_Expression.
2012-10-02 Thomas Quinot <quinot@adacore.com>
* exp_aggr.adb (Get_Component_Val): Rewrite code that computes
justification of bits in enclosing word in an attempt to make
it clearer.
From-SVN: r191973
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 15 | ||||
-rw-r--r-- | gcc/ada/exp_aggr.adb | 27 | ||||
-rw-r--r-- | gcc/ada/sinfo.ads | 6 | ||||
-rw-r--r-- | gcc/ada/types.h | 1 |
4 files changed, 33 insertions, 16 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index cddd55b..dd4f91a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,9 @@ 2012-10-02 Eric Botcazou <ebotcazou@adacore.com> + * types.h: Minor cosmetic fix. + +2012-10-02 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interfaces/decl.c (elaborate_expression_1): Use the variable for bounds of loop iteraration scheme only for locally defined subtypes. @@ -8,6 +12,17 @@ 2012-10-02 Robert Dewar <dewar@adacore.com> + * sinfo.ads: Remove refs of N_Conditional_Expression and + N_Parameterized_Expression. + +2012-10-02 Thomas Quinot <quinot@adacore.com> + + * exp_aggr.adb (Get_Component_Val): Rewrite code that computes + justification of bits in enclosing word in an attempt to make + it clearer. + +2012-10-02 Robert Dewar <dewar@adacore.com> + * par_sco.adb, sem_ch3.adb, layout.adb, exp_ch7.adb, exp_imgv.adb, exp_util.adb, exp_util.ads, exp_attr.adb, sinfo.adb, sinfo.ads, exp_ch9.adb, style.ads, scos.ads, debug.adb, einfo.ads, scng.adb, diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 7141a30..1d42bf8 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -6167,21 +6167,30 @@ package body Exp_Aggr is Expr : Node_Id; -- Next expression from positional parameters of aggregate + Left_Justified : Boolean; + -- Set True if we are filling the high order bits of the target + -- value (i.e. the value is left justified). + begin -- For little endian, we fill up the low order bits of the target -- value. For big endian we fill up the high order bits of the -- target value (which is a left justified modular value). - -- Above comment needs extending for the code below, which is by - -- the way incomprehensible, I have no idea what a xor b xor c - -- means, and it hurts my brain to try to figure it out??? - -- Let's introduce a new variable, perhaps Effectively_Big_Endian - -- and compute it with clearer code ??? + Left_Justified := Bytes_Big_Endian; - if Bytes_Big_Endian - xor Debug_Flag_8 - xor Reverse_Storage_Order (Base_Type (Typ)) - then + -- Switch justification if using -gnatd8 + + if Debug_Flag_8 then + Left_Justified := not Left_Justified; + end if; + + -- Switch justfification if reverse storage order + + if Reverse_Storage_Order (Base_Type (Typ)) then + Left_Justified := not Left_Justified; + end if; + + if Left_Justified then Shift := Csiz * (Len - 1); Incr := -Csiz; else diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index a0f5b52..c2c1935 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -12439,10 +12439,4 @@ package Sinfo is -- Rename N_Return_Statement to be N_Simple_Return_Statement. Clients -- should refer to N_Simple_Return_Statement. - N_Parameterized_Expression : constant Node_Kind := N_Expression_Function; - -- Old name for expression function (used during Ada 2012 transition) - - N_Conditional_Expression : Node_Kind renames N_If_Expression; - -- Old name for if expression (used during Ada 2012 transition) - end Sinfo; diff --git a/gcc/ada/types.h b/gcc/ada/types.h index bd1ef62..a0f2891 100644 --- a/gcc/ada/types.h +++ b/gcc/ada/types.h @@ -384,4 +384,3 @@ typedef Int Mechanism_Type; #define SE_Object_Too_Large 34 #define LAST_REASON_CODE 34 - |