diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/cvt.c | 3 | ||||
-rw-r--r-- | gcc/stmt.c | 9 | ||||
-rw-r--r-- | gcc/tree.c | 2 |
5 files changed, 26 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eea65d3f8d7..a8b38dff93f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +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. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f57eb1b7875..91fb9df3079 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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> diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 6f4af7dcafc..6d4b961f728 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -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) { diff --git a/gcc/stmt.c b/gcc/stmt.c index bc52a6b096b..7b388dd6c1d 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -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; } diff --git a/gcc/tree.c b/gcc/tree.c index 52faeaf16e6..b252a67c354 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -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) |