diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2008-05-30 07:35:17 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2008-05-30 07:35:17 +0000 |
commit | bfab40f8e5c12b8fd32dfd55a7437528def52f3e (patch) | |
tree | 1d2ca1392e19a2d70a4160fda30ef8490a0da0ad /gcc | |
parent | c100de59ebf2f118ce0757c475b078b6f62d4017 (diff) | |
download | gcc-bfab40f8e5c12b8fd32dfd55a7437528def52f3e.zip gcc-bfab40f8e5c12b8fd32dfd55a7437528def52f3e.tar.gz gcc-bfab40f8e5c12b8fd32dfd55a7437528def52f3e.tar.bz2 |
* fold-const.c (fold_unary) <CASE_CONVERT>: Add ??? comment.
From-SVN: r136200
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/fold-const.c | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aeff771..82d2478 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2008-05-30 Eric Botcazou <ebotcazou@adacore.com> + + * fold-const.c (fold_unary) <CASE_CONVERT>: Add ??? comment. + 2008-05-30 Danny Smith <dannysmith@users.sourceforge.net> * incpath.c: Use HOST_LACKS_INODE_NUMBERS conditional diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 25756bb..4a9d55f 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -7866,7 +7866,10 @@ fold_unary (enum tree_code code, tree type, tree op0) /* Convert (T)(x & c) into (T)x & (T)c, if c is an integer constants (if x has signed type, the sign bit cannot be set - in c). This folds extension into the BIT_AND_EXPR. */ + in c). This folds extension into the BIT_AND_EXPR. + ??? We don't do it for BOOLEAN_TYPE or ENUMERAL_TYPE because they + very likely don't have maximal range for their precision and this + transformation effectively doesn't preserve non-maximal ranges. */ if (TREE_CODE (type) == INTEGER_TYPE && TREE_CODE (op0) == BIT_AND_EXPR && TREE_CODE (TREE_OPERAND (op0, 1)) == INTEGER_CST) |