diff options
author | Joel Brobecker <brobecker@gnat.com> | 2008-09-30 21:53:32 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2008-09-30 21:53:32 +0000 |
commit | d37209fddb5e18eed2f215c89446045673dab68c (patch) | |
tree | 9ebd59744cecd2c4dc9bebc96d6d87ae0dbdebba | |
parent | * ada-lang.c (ada_lookup_struct_elt_type): Handle case of a "naked" (diff) | |
download | binutils-gdb-d37209fddb5e18eed2f215c89446045673dab68c.tar.gz binutils-gdb-d37209fddb5e18eed2f215c89446045673dab68c.tar.bz2 binutils-gdb-d37209fddb5e18eed2f215c89446045673dab68c.zip |
* ada-lang.c (ada_modulus): Correct to avoid sign problem with
moduli >= 2**31.
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/ada-lang.c | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d67ea1c0d1e..f6d30f1c863 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,4 +1,9 @@ -2008-09-30 Paul Hilfinger <brobecker@adacore.com> +2008-09-30 Paul Hilfinger <hilfinger@adacore.com> + + * ada-lang.c (ada_modulus): Correct to avoid sign problem with + moduli >= 2**31. + +2008-09-30 Paul Hilfinger <hilfinger@adacore.com> * ada-lang.c (ada_lookup_struct_elt_type): Handle case of a "naked" variant branch. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 53505165926..3c4f05a5dd6 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; } |