* serial.h (SERIAL_SET_TTY_STATE): Comment return value.
[deliverable/binutils-gdb.git] / gdb / c-exp.y
index 08f7548d566b7ecafc44c091a68ae1d2520eeb8a..8860dfc784b22b0b75dc8a124db62f6a66041004 100644 (file)
@@ -903,6 +903,7 @@ parse_number (p, len, parsed_float, putithere)
      here, and we do kind of silly things like cast to unsigned.  */
   register LONGEST n = 0;
   register LONGEST prevn = 0;
+  unsigned LONGEST un;
 
   register int i = 0;
   register int c;
@@ -1023,8 +1024,9 @@ parse_number (p, len, parsed_float, putithere)
      the case where it is we just always shift the value more than
      once, with fewer bits each time.  */
 
+  un = (unsigned LONGEST)n >> 2;
   if (long_p == 0
-      && (((unsigned LONGEST)n >> 2) >> (TARGET_INT_BIT - 2)) == 0)
+      && (un >> (TARGET_INT_BIT - 2)) == 0)
     {
       high_bit = ((unsigned LONGEST)1) << (TARGET_INT_BIT-1);
 
@@ -1038,7 +1040,7 @@ parse_number (p, len, parsed_float, putithere)
       signed_type = builtin_type_int;
     }
   else if (long_p <= 1
-          && (((unsigned LONGEST)n >> 2) >> (TARGET_LONG_BIT - 2)) == 0)
+          && (un >> (TARGET_LONG_BIT - 2)) == 0)
     {
       high_bit = ((unsigned LONGEST)1) << (TARGET_LONG_BIT-1);
       unsigned_type = builtin_type_unsigned_long;
@@ -1520,7 +1522,11 @@ yylex ()
       }
     if (sym && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
         {
-#if 0
+#if 1
+         /* Despite the following flaw, we need to keep this code enabled.
+            Because we can get called from check_stub_method, if we don't
+            handle nested types then it screws many operations in any
+            program which uses nested types.  */
          /* In "A::x", if x is a member function of A and there happens
             to be a type (nested or not, since the stabs don't make that
             distinction) named x, then this code incorrectly thinks we
This page took 0.025093 seconds and 4 git commands to generate.