diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-26 18:51:07 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-26 18:51:07 +0000 |
commit | a1d07e97417fb905496f727f3a78b89e2eaf6397 (patch) | |
tree | 6399922f5183f7307326645bf3146bd07174447d /gcc/stmt.c | |
parent | 9579733ed5bf9976b201cbe8cc2649ea033987bc (diff) | |
download | gcc-a1d07e97417fb905496f727f3a78b89e2eaf6397.tar.gz |
PR c/39889
* stmt.c (warn_if_unused_value): Look through NON_LVALUE_EXPR.
* gcc.dg/Wunused-value-3.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146811 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c index e2688efadad..6dc32fdfc12 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -1418,6 +1418,7 @@ warn_if_unused_value (const_tree exp, location_t locus) goto restart; case SAVE_EXPR: + case NON_LVALUE_EXPR: exp = TREE_OPERAND (exp, 0); goto restart; |