Commit f3da0ead by Jason Merrill Committed by Jason Merrill

tree.c (get_unwidened): Decide whether to narrow a bitfield reference based on TYPE_SIZE...

        * tree.c (get_unwidened): Decide whether to narrow a bitfield
        reference based on TYPE_SIZE, not TYPE_PRECISION.
        * cp/cvt.c (convert_to_void): Don't warn about the RHS of a comma
        being useless if TREE_NO_UNUSED_WARNING is set.

        * stmt.c (parse_output_constraint): Warn about in-out constraint
        that doesn't allow a register.
        (parse_input_constraint): Warn about matching constraint that
        doesn't allow a register.

From-SVN: r74871
parent 46eb4b39
2003-12-19 Jason Merrill <jason@redhat.com>
* tree.c (get_unwidened): Decide whether to narrow a bitfield
reference based on TYPE_SIZE, not TYPE_PRECISION.
* stmt.c (parse_output_constraint): Warn about in-out constraint
that doesn't allow a register.
(parse_input_constraint): Warn about matching constraint that
doesn't allow a register.
2003-12-19 James E Wilson <wilson@specifixinc.com>
* flow.c (mark_set_regs, case PARALLEL): Scan loop forwards.
......@@ -27,10 +37,12 @@
decimal formats.
2003-12-19 Stuart Hastings <stuart@apple.com>
* gcc/config/i386/i386.c (ix86_expand_call, x86_output_mi_thunk):
Trivial fixes for i386.c on Darwin/x86.
2003-12-19 Fariborz Jahanian <fjahanian@apple.com>
* config/rs6000/rs6000.c (legitimate_lo_sum_address_p): Add code to
recognize macho-style lo_sum adrress patterns.
......
......@@ -24,6 +24,8 @@
PR c++/13371
* typeck.c (build_modify_expr): Stabilize lhs if we're narrowing.
* cvt.c (convert_to_void): Don't warn about the RHS of a comma
being useless if TREE_NO_UNUSED_WARNING is set.
2003-12-18 Richard Henderson <rth@redhat.com>
......
......@@ -817,7 +817,8 @@ convert_to_void (tree expr, const char *implicit)
/* The second part of a compound expr contains the value. */
tree op1 = TREE_OPERAND (expr,1);
tree new_op1 = convert_to_void
(op1, implicit ? "right-hand operand of comma" : NULL);
(op1, (implicit && !TREE_NO_UNUSED_WARNING (expr)
? "right-hand operand of comma" : NULL));
if (new_op1 != op1)
{
......
......@@ -1254,6 +1254,9 @@ parse_output_constraint (const char **constraint_p, int operand_num,
break;
}
if (*is_inout && !*allows_reg)
warning ("read-write constraint does not allow a register");
return true;
}
......@@ -1269,6 +1272,7 @@ parse_input_constraint (const char **constraint_p, int input_num,
const char *orig_constraint = constraint;
size_t c_len = strlen (constraint);
size_t j;
bool saw_match = false;
/* Assume the constraint doesn't allow the use of either
a register or memory. */
......@@ -1320,6 +1324,8 @@ parse_input_constraint (const char **constraint_p, int input_num,
char *end;
unsigned long match;
saw_match = true;
match = strtoul (constraint + j, &end, 10);
if (match >= (unsigned long) noutputs)
{
......@@ -1384,6 +1390,9 @@ parse_input_constraint (const char **constraint_p, int input_num,
break;
}
if (saw_match && !*allows_reg)
warning ("matching constraint does not allow a register");
return true;
}
......
......@@ -4123,7 +4123,7 @@ get_unwidened (tree op, tree for_type)
The resulting extension to its nominal type (a fullword type)
must fit the same conditions as for other extensions. */
if (innerprec < TYPE_PRECISION (TREE_TYPE (op))
if (INT_CST_LT_UNSIGNED (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (op)))
&& (for_type || ! DECL_BIT_FIELD (TREE_OPERAND (op, 1)))
&& (! uns || final_prec <= innerprec || unsignedp)
&& type != 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment