diff options
author | Andrew Cagney <cagney@redhat.com> | 1998-11-25 22:13:53 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1998-11-25 22:13:53 +0000 |
commit | c8623080cb217735f4f7460186e9a1ad910b4a3b (patch) | |
tree | 595d432ebb57f79ae1d3f69802ea5236beb77b29 /gdb/c-exp.y | |
parent | a6a5d3492796f75b03b92f86226b2741ee468f0d (diff) | |
download | gdb-c8623080cb217735f4f7460186e9a1ad910b4a3b.zip gdb-c8623080cb217735f4f7460186e9a1ad910b4a3b.tar.gz gdb-c8623080cb217735f4f7460186e9a1ad910b4a3b.tar.bz2 |
CARP: --enable-build-warnings=-Werror: Fix problems stopping GDB being
canadian-crossed to host i386-cygwin.
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r-- | gdb/c-exp.y | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 38279f3..4b40eb0 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -1085,18 +1085,13 @@ parse_number (p, len, parsed_float, putithere) } else { - /* Avoid negative shift. */ - if (TARGET_LONG_LONG_BIT <= 32) - high_bit = ((ULONGEST)1 << TARGET_LONG_LONG_BIT - 1); - else - high_bit = (((ULONGEST)1) - << (TARGET_LONG_LONG_BIT - 32 - 1) - << 16 - << 16); - if (high_bit == 0) + int shift; + if (sizeof (ULONGEST) * HOST_CHAR_BIT < TARGET_LONG_LONG_BIT) /* A long long does not fit in a LONGEST. */ - high_bit = - (ULONGEST)1 << (sizeof (LONGEST) * HOST_CHAR_BIT - 1); + shift = (sizeof (ULONGEST) * HOST_CHAR_BIT - 1); + else + shift = (TARGET_LONG_LONG_BIT - 1); + high_bit = (ULONGEST) 1 << shift; unsigned_type = builtin_type_unsigned_long_long; signed_type = builtin_type_long_long; } |