2010-03-19 Stan Shebs <stan@codesourcery.com>
authorStan Shebs <shebs@codesourcery.com>
Fri, 19 Mar 2010 18:21:03 +0000 (18:21 +0000)
committerStan Shebs <shebs@codesourcery.com>
Fri, 19 Mar 2010 18:21:03 +0000 (18:21 +0000)
* ax-general.c (ax_const_l): Fix a sizing bug.

gdb/ChangeLog
gdb/ax-general.c

index c5ba134..f2b124c 100644 (file)
@@ -1,3 +1,7 @@
+2010-03-19  Stan Shebs  <stan@codesourcery.com>
+
+       * ax-general.c (ax_const_l): Fix a sizing bug. 
+
 2010-03-18  Joel Brobecker  <brobecker@adacore.com>
 
        GDB 7.1 released.
index e2ceb3d..69a26d2 100644 (file)
@@ -231,7 +231,7 @@ ax_const_l (struct agent_expr *x, LONGEST l)
      use the shortest representation.  */
   for (op = 0, size = 8; size < 64; size *= 2, op++)
     {
-      LONGEST lim = 1 << (size - 1);
+      LONGEST lim = ((LONGEST) 1) << (size - 1);
 
       if (-lim <= l && l <= lim - 1)
         break;