Changeset 1588 for branches/GNU/src/gcc/gcc/convert.c
- Timestamp:
- Nov 3, 2004, 6:47:21 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gcc/gcc/convert.c
-
Property cvs2svn:cvs-rev
changed from
1.1.1.2
to1.1.1.3
r1587 r1588 183 183 184 184 else if (outprec >= inprec) 185 return build1 (NOP_EXPR, type, expr); 185 { 186 enum tree_code code; 187 188 /* If the precision of the EXPR's type is K bits and the 189 destination mode has more bits, and the sign is changing, 190 it is not safe to use a NOP_EXPR. For example, suppose 191 that EXPR's type is a 3-bit unsigned integer type, the 192 TYPE is a 3-bit signed integer type, and the machine mode 193 for the types is 8-bit QImode. In that case, the 194 conversion necessitates an explicit sign-extension. In 195 the signed-to-unsigned case the high-order bits have to 196 be cleared. */ 197 if (TREE_UNSIGNED (type) != TREE_UNSIGNED (TREE_TYPE (expr)) 198 && (TYPE_PRECISION (TREE_TYPE (expr)) 199 != GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (expr))))) 200 code = CONVERT_EXPR; 201 else 202 code = NOP_EXPR; 203 204 return build1 (code, type, expr); 205 } 186 206 187 207 /* If TYPE is an enumeral type or a type with a precision less -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.