Fix mn10200 build failure on redhat 5.0 linux.
[deliverable/binutils-gdb.git] / gdb / c-exp.y
index a6d21aebdd4531364ae68aa9922cdd103cd3f709..38279f3fc6ffff5e74fa8e227a2cfc4166647ea6 100644 (file)
@@ -1085,10 +1085,14 @@ parse_number (p, len, parsed_float, putithere)
     }
   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 =
This page took 0.034959 seconds and 4 git commands to generate.