Commit 7e9d4b22 by Jason Merrill Committed by Jason Merrill

typeck.c (type_after_usual_arithmetic_conversions): Prefer a SIZETYPE to a non-SIZETYPE.

        * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
        SIZETYPE to a non-SIZETYPE.

From-SVN: r32684
parent 89fedfc7
2000-03-22 Jason Merrill <jason@casey.cygnus.com>
* typeck.c (type_after_usual_arithmetic_conversions): Prefer a
SIZETYPE to a non-SIZETYPE.
2000-03-21 Mark Mitchell <mark@codesourcery.com>
* class.c (layout_virtual_bases): Adjust names in conditionally
......
......@@ -346,6 +346,12 @@ type_after_usual_arithmetic_conversions (t1, t2)
if (code1 != REAL_TYPE)
{
/* If one is a sizetype, use it so size_binop doesn't blow up. */
if (TYPE_IS_SIZETYPE (t1) > TYPE_IS_SIZETYPE (t2))
return build_type_attribute_variant (t1, attributes);
if (TYPE_IS_SIZETYPE (t2) > TYPE_IS_SIZETYPE (t1))
return build_type_attribute_variant (t2, attributes);
/* If one is unsigned long long, then convert the other to unsigned
long long. */
if (same_type_p (TYPE_MAIN_VARIANT (t1), long_long_unsigned_type_node)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment