* c-exp.y (parse_number): Check TARGET_LONG_LONG_BIT when setting
high_bit to avoid undefined negative shift.
+1998-11-03 Jim Wilson <wilson@cygnus.com>
+
+ * c-exp.y (parse_number): Check TARGET_LONG_LONG_BIT when setting
+ high_bit to avoid undefined negative shift.
+
Mon Nov 2 15:26:33 1998 Geoffrey Noer <noer@cygnus.com>
* configure.in: Check cygwin* instead of cygwin32*.
}
else
{
- high_bit = (((ULONGEST)1)
- << (TARGET_LONG_LONG_BIT - 32 - 1)
- << 16
- << 16);
+ /* Avoid negative shift. */
+ if (TARGET_LONG_LONG_BIT <= 32)
+ high_bit = ((ULONGEST)1 << TARGET_LONG_LONG_BIT - 1);
+ else
+ high_bit = (((ULONGEST)1)
+ << (TARGET_LONG_LONG_BIT - 32 - 1)
+ << 16
+ << 16);
if (high_bit == 0)
/* A long long does not fit in a LONGEST. */
high_bit =