aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2008-09-30 21:53:32 +0000
committerJoel Brobecker <brobecker@gnat.com>2008-09-30 21:53:32 +0000
commitd37209fddb5e18eed2f215c89446045673dab68c (patch)
tree9ebd59744cecd2c4dc9bebc96d6d87ae0dbdebba /gdb/ada-lang.c
parentb1f33ddde15312e8d7bdf4750a443ffd7dfbbea9 (diff)
downloadgdb-d37209fddb5e18eed2f215c89446045673dab68c.zip
gdb-d37209fddb5e18eed2f215c89446045673dab68c.tar.gz
gdb-d37209fddb5e18eed2f215c89446045673dab68c.tar.bz2
* ada-lang.c (ada_modulus): Correct to avoid sign problem with
moduli >= 2**31.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 5350516..3c4f05a 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -9626,7 +9626,7 @@ ada_is_modular_type (struct type *type)
ULONGEST
ada_modulus (struct type * type)
{
- return (ULONGEST) TYPE_HIGH_BOUND (type) + 1;
+ return (ULONGEST) (unsigned int) TYPE_HIGH_BOUND (type) + 1;
}