diff options
Diffstat (limited to 'gdb/f-exp.y')
-rw-r--r-- | gdb/f-exp.y | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/f-exp.y b/gdb/f-exp.y index f879373..b03ca37 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -766,23 +766,24 @@ parse_number (p, len, parsed_float, putithere) target int size is different to the target long size. In the expression below, we could have tested - (n >> TARGET_INT_BIT) + (n >> gdbarch_int_bit (current_gdbarch)) to see if it was zero, but too many compilers warn about that, when ints and longs are the same size. So we shift it twice, with fewer bits each time, for the same result. */ - if ((TARGET_INT_BIT != TARGET_LONG_BIT - && ((n >> 2) >> (TARGET_INT_BIT-2))) /* Avoid shift warning */ + if ((gdbarch_int_bit (current_gdbarch) != gdbarch_long_bit (current_gdbarch) + && ((n >> 2) + >> (gdbarch_int_bit (current_gdbarch)-2))) /* Avoid shift warning */ || long_p) { - high_bit = ((ULONGEST)1) << (TARGET_LONG_BIT-1); + high_bit = ((ULONGEST)1) << (gdbarch_long_bit (current_gdbarch)-1); unsigned_type = builtin_type_unsigned_long; signed_type = builtin_type_long; } else { - high_bit = ((ULONGEST)1) << (TARGET_INT_BIT-1); + high_bit = ((ULONGEST)1) << (gdbarch_int_bit (current_gdbarch)-1); unsigned_type = builtin_type_unsigned_int; signed_type = builtin_type_int; } |