aboutsummaryrefslogtreecommitdiff
path: root/gdb/ch-exp.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1995-12-11 09:02:26 +0000
committerPer Bothner <per@bothner.com>1995-12-11 09:02:26 +0000
commitf6d165855eebd59b95ceb16c48f10c7c927d187c (patch)
tree264ab904eadb005f1a121f9b9cb5374d09458855 /gdb/ch-exp.c
parent406477a6961ef023cb8414059fbd8979c9d879f6 (diff)
downloadgdb-f6d165855eebd59b95ceb16c48f10c7c927d187c.zip
gdb-f6d165855eebd59b95ceb16c48f10c7c927d187c.tar.gz
gdb-f6d165855eebd59b95ceb16c48f10c7c927d187c.tar.bz2
* valops.c (value_cast): Handle casts to and from TYPE_CODE_CHAR.
* ch-exp.c (match_integer_literal): Fix long long support. * gdbtypes.c (get_discrete_bounds): Make TYPE_LENGTH (type) == sizeof (LONGEST) case work OK.
Diffstat (limited to 'gdb/ch-exp.c')
-rw-r--r--gdb/ch-exp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/ch-exp.c b/gdb/ch-exp.c
index 6c2471f..31c92b5 100644
--- a/gdb/ch-exp.c
+++ b/gdb/ch-exp.c
@@ -597,7 +597,7 @@ parse_primval ()
case CHARACTER_LITERAL:
write_exp_elt_opcode (OP_LONG);
write_exp_elt_type (PEEK_LVAL ().typed_val.type);
- write_exp_elt_longcst ((LONGEST) (PEEK_LVAL ().typed_val.val));
+ write_exp_elt_longcst (PEEK_LVAL ().typed_val.val);
write_exp_elt_opcode (OP_LONG);
FORWARD_TOKEN ();
break;
@@ -1544,8 +1544,8 @@ match_integer_literal ()
else
{
yylval.typed_val.val = ival;
-#ifdef CC_HAS_LONG_LONG
- if (ival > 2147483647 || ival < -2147483648)
+#if defined(CC_HAS_LONG_LONG) && defined(__STDC__)
+ if (ival > (LONGEST)2147483647U || ival < -(LONGEST)2147483648U)
yylval.typed_val.type = builtin_type_long_long;
else
#endif