OSDN Git Service

PR c/23113
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 6 Aug 2005 11:31:49 +0000 (11:31 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 6 Aug 2005 11:31:49 +0000 (11:31 +0000)
commit1c3d3e7cbc93a587d68e8e91bc7e6c07cf205840
tree50083463eef147d4518d2138f1a14ce9e8fb18b7
parentca8cce9fc2a2367248ffe52d526ce0bfbb1ed71b
PR c/23113
* stmt.c (warn_if_unused_value): Check TREE_NO_WARNING at start.
Don't handle NOP_EXPR, CONVERT_EXPR and NON_LVALUE_EXPR
specially.  Check for side effects only for COND_EXPR.
* c-typeck.c (c_finish_stmt_expr): Mark statement expression
return with TREE_NO_WARNING.

testsuite:
* gcc.dg/Wunused-value-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102805 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-typeck.c
gcc/stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wunused-value-1.c [new file with mode: 0644]