diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-01-15 19:51:56 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-01-15 19:51:56 +0000 |
commit | bb1f42d4f09de23f33128e76b24d5259b46602dc (patch) | |
tree | 78dc3cb55d2c5af787aca08aedadc6def2972685 /gdb/c-exp.y | |
parent | d307fed1264a9d4164e98c710d4672b321d83213 (diff) | |
download | gdb-bb1f42d4f09de23f33128e76b24d5259b46602dc.zip gdb-bb1f42d4f09de23f33128e76b24d5259b46602dc.tar.gz gdb-bb1f42d4f09de23f33128e76b24d5259b46602dc.tar.bz2 |
* c-exp.y (parse_number): Make it so that integer constants are
builtin_type_long_long if builtin_type_long isn't big enough or if
an "LL" suffix is used. Properly handle "UL" or "LU" suffixes.
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r-- | gdb/c-exp.y | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 6a96eb1..08f7548 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -1046,7 +1046,13 @@ parse_number (p, len, parsed_float, putithere) } else { - high_bit = ((unsigned LONGEST)1) << (TARGET_LONG_LONG_BIT - 1); + high_bit = (((unsigned LONGEST)1) + << (TARGET_LONG_LONG_BIT - 32 - 1) + << 16 + << 16); + if (high_bit == 0) + /* A long long does not fit in a LONGEST. */ + high_bit = (unsigned LONGEST)1 << sizeof (LONGEST) * HOST_CHAR_BIT - 1; unsigned_type = builtin_type_unsigned_long_long; signed_type = builtin_type_long_long; } |