From cf3e25cabf6d6e9ead2bc82719d560020ef0740b Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Fri, 19 Mar 2010 18:21:03 +0000 Subject: [PATCH] 2010-03-19 Stan Shebs * ax-general.c (ax_const_l): Fix a sizing bug. --- gdb/ChangeLog | 4 ++++ gdb/ax-general.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c5ba1345cbf..f2b124ce0ef 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-03-19 Stan Shebs + + * ax-general.c (ax_const_l): Fix a sizing bug. + 2010-03-18 Joel Brobecker GDB 7.1 released. diff --git a/gdb/ax-general.c b/gdb/ax-general.c index e2ceb3de706..69a26d23080 100644 --- a/gdb/ax-general.c +++ b/gdb/ax-general.c @@ -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; -- 2.30.2