diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-01 09:46:10 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-01 09:46:10 +0000 |
commit | 35f6830b576c881e6058ee333a588a085868ac11 (patch) | |
tree | 2cbe9a751948983c270cd699ca60ecdf90ea2fb8 /gcc | |
parent | 8cf481c96fe7b6b8e83d54df00d1bbe3fba4be1a (diff) | |
download | gcc-35f6830b576c881e6058ee333a588a085868ac11.tar.gz |
2014-08-01 Arnaud Charlet <charlet@adacore.com>
* exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
previous state in CodePeer_Mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213435 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/exp_attr.adb | 17 |
2 files changed, 19 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 69794aa4006..a9856c83896 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2014-08-01 Arnaud Charlet <charlet@adacore.com> + + * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to + previous state in CodePeer_Mode. + 2014-08-01 Robert Dewar <dewar@adacore.com> * hostparm.ads: Put back definition of OpenVMS as False to aid diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index fb715ea6d21..d42018a55b9 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -7955,8 +7955,16 @@ package body Exp_Attr is Id : constant Attribute_Id := Get_Attribute_Id (Attribute_Name (N)); begin + -- Machine and Model can be expanded by the backend, but in CodePeer + -- mode, we prefer the front end to do the expansion, because CodePeer + -- is not prepared to handle these attributes. + if Id = Attribute_Machine or else Id = Attribute_Model then - return True; + return not CodePeer_Mode; + + -- Remaining cases handled by the back end are Rounding and Truncatation + -- when appearing as the operand of a conversion to some integer type. + -- CodePeer can handle these cases fine. elsif Nkind (Parent (N)) /= N_Type_Conversion or else not Is_Integer_Type (Etype (Parent (N))) @@ -7964,8 +7972,11 @@ package body Exp_Attr is return False; end if; - -- Should also support 'Machine_Rounding and 'Unbiased_Rounding, but - -- required back end support has not been implemented yet ??? + -- Here we are in the integer conversion context + + -- Very probably we should also recognize the cases of Machine_Rounding + -- and unbiased rounding in this conversion context, but the back end is + -- not yet prepared to handle these cases ??? return Id = Attribute_Rounding or else Id = Attribute_Truncation; end Is_Inline_Floating_Point_Attribute; |