* convert.c (convert): Fold BOOLEAN_TYPE types to the proper variant.
From-SVN: r185174
This commit is contained in:
parent
b364b42515
commit
f8627856b4
|
@ -1,3 +1,7 @@
|
|||
2012-03-10 Steven Bosscher <steven@gcc.gnu.org>
|
||||
|
||||
* convert.c (convert): Fold BOOLEAN_TYPE types to the proper variant.
|
||||
|
||||
2012-03-09 Steven Bosscher <steven@gcc.gnu.org>
|
||||
|
||||
* Make-lang.in (convert.o): Depend on convert.h.
|
||||
|
|
|
@ -95,7 +95,8 @@ convert (tree type, tree expr)
|
|||
if (code == VOID_TYPE)
|
||||
return fold_build1_loc (input_location, CONVERT_EXPR, type, e);
|
||||
if (code == BOOLEAN_TYPE)
|
||||
return truthvalue_conversion (e);
|
||||
return fold_build1_loc (input_location, NOP_EXPR, type,
|
||||
truthvalue_conversion (e));
|
||||
if (code == INTEGER_TYPE)
|
||||
return fold (convert_to_integer (type, e));
|
||||
if (code == POINTER_TYPE || code == REFERENCE_TYPE)
|
||||
|
|
Loading…
Reference in New Issue