/* Fixed-point arithmetic support.
- Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
const FIXED_VALUE_TYPE *b, bool subtract_p, bool sat_p)
{
bool overflow_p = false;
- double_int temp = subtract_p ? double_int_neg (b->data) : b->data;
- bool unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (a->mode);
- int i_f_bits = GET_MODE_IBIT (a->mode) + GET_MODE_FBIT (a->mode);
+ bool unsigned_p;
+ double_int temp;
+ int i_f_bits;
+
+ /* This was a conditional expression but it triggered a bug in
+ Sun C 5.5. */
+ if (subtract_p)
+ temp = double_int_neg (b->data);
+ else
+ temp = b->data;
+
+ unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (a->mode);
+ i_f_bits = GET_MODE_IBIT (a->mode) + GET_MODE_FBIT (a->mode);
f->mode = a->mode;
f->data = double_int_add (a->data, temp);
if (unsigned_p) /* Unsigned type. */
fixed_compare (int icode, const FIXED_VALUE_TYPE *op0,
const FIXED_VALUE_TYPE *op1)
{
- enum tree_code code = icode;
+ enum tree_code code = (enum tree_code) icode;
gcc_assert (op0->mode == op1->mode);
switch (code)