+2005-02-26 James A. Morrison <phython@gcc.gnu.org>
+
+ * parse.y: Do comparisons as the type of the first expression.
+ * treetree.c (tree_code_get_integer_value): Build integer constants
+ with the proper type.
+
2005-02-26 James A. Morrison <phython@gcc.gnu.org>
* Make-lang.in: Remove commented out code.
struct prod_token_parm_item *tok = $2;
struct prod_token_parm_item *op1 = $1;
struct prod_token_parm_item *op2 = $3;
+ int type_code = NUMERIC_TYPE (op1);
+ if (!type_code)
+ YYERROR;
$$ = make_plus_expression
- (tok, op1, op2, SIGNED_INT, EXP_EQUALS);
+ (tok, op1, op2, type_code, EXP_EQUALS);
}
|variable_ref ASSIGN expression {
struct prod_token_parm_item *tok = $2;
for (ix = start; ix < length; ix++)
val = val * 10 + chars[ix] - (unsigned char)'0';
val = val*negative;
- return build_int_cst_wide (NULL_TREE,
+ return build_int_cst_wide (start == 1 ?
+ integer_type_node : unsigned_type_node,
val & 0xffffffff, (val >> 32) & 0xffffffff);
}