aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2003-12-19 22:21:25 -0500
committerJason Merrill <jason@gcc.gnu.org>2003-12-19 22:21:25 -0500
commitf3da0ead0c5c3772c8322cc4aad8deeb382ef2dd (patch)
tree9bb4e10d802613726fd9fcebe175b05cee831ce4 /gcc/cp
parent46eb4b398948ddef881e51b9c49d96e242d56002 (diff)
downloadgcc-f3da0ead0c5c3772c8322cc4aad8deeb382ef2dd.zip
gcc-f3da0ead0c5c3772c8322cc4aad8deeb382ef2dd.tar.gz
gcc-f3da0ead0c5c3772c8322cc4aad8deeb382ef2dd.tar.bz2
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
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog2
-rw-r--r--gcc/cp/cvt.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f57eb1b..91fb9df 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 6f4af7d..6d4b961 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)
{