+2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * c-typeck.c (c_common_type): Prefer double_type_node over
+ other REAL_TYPE types with the same precision.
+ (convert_arguments): Likewise.
+
2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-objc-common.c (c_tree_printer): Document the nature of the cast.
|| TYPE_MAIN_VARIANT (t2) == long_double_type_node)
return long_double_type_node;
+ /* Likewise, prefer double to float even if same size.
+ We got a couple of embedded targets with 32 bit doubles, and the
+ pdp11 might have 64 bit floats. */
+ if (TYPE_MAIN_VARIANT (t1) == double_type_node
+ || TYPE_MAIN_VARIANT (t2) == double_type_node)
+ return double_type_node;
+
/* Otherwise prefer the unsigned one. */
if (TYPE_UNSIGNED (t1))
}
else if (TREE_CODE (valtype) == REAL_TYPE
&& (TYPE_PRECISION (valtype)
- < TYPE_PRECISION (double_type_node))
+ <= TYPE_PRECISION (double_type_node))
+ && valtype != double_type_node
+ && valtype != long_double_type_node
&& !DECIMAL_FLOAT_MODE_P (TYPE_MODE (valtype)))
{
if (type_generic)