OSDN Git Service

* fold-const.c (constant_boolean_node): Always create values of
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Feb 2005 21:44:18 +0000 (21:44 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Feb 2005 21:44:18 +0000 (21:44 +0000)
the specified type, don't bother calling truthvalue_conversion.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95237 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fold-const.c

index eddfd7b..9265526 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-18  Roger Sayle  <roger@eyesopen.com>
+
+       * fold-const.c (constant_boolean_node): Always create values of the
+       specified type, don't bother calling truthvalue_conversion.
+
 2005-02-18  Joseph S. Myers  <joseph@codesourcery.com>
 
        * except.c (output_function_exception_table): Call
index a04c061..a75ccdc 100644 (file)
@@ -5381,9 +5381,6 @@ constant_boolean_node (int value, tree type)
     return value ? integer_one_node : integer_zero_node;
   else if (type == boolean_type_node)
     return value ? boolean_true_node : boolean_false_node;
-  else if (TREE_CODE (type) == BOOLEAN_TYPE)
-    return lang_hooks.truthvalue_conversion (value ? integer_one_node
-                                                  : integer_zero_node);
   else
     return build_int_cst (type, value);
 }