diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-07 16:11:10 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-07 16:11:10 +0000 |
commit | 0e364d12182381ee4b9f39c7d0605c1af0eed648 (patch) | |
tree | ed52c7e668a41a71abd14d2bc80216a67ea6d0f5 /gcc/c-common.c | |
parent | e91839a42404645e3e0464df560d46ffa3954d86 (diff) | |
download | gcc-0e364d12182381ee4b9f39c7d0605c1af0eed648.tar.gz |
* gimplify.c (gimplify_call_expr): Make return in memory explicit.
(gimplify_modify_expr_rhs): Likewise.
* c-common.c (c_warn_unused_result): Check TREE_USED before
warning about a CALL_EXPR with an unused value.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85671 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index c3dc4ea6359..868088f0e1c 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -5378,6 +5378,9 @@ c_warn_unused_result (tree *top_p) break; case CALL_EXPR: + if (TREE_USED (t)) + break; + /* This is a naked call, as opposed to a CALL_EXPR nested inside a MODIFY_EXPR. All calls whose value is ignored should be represented like this. Look for the attribute. */ |