summaryrefslogtreecommitdiffstats
path: root/gcc/stmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 0fb7fb923b1..7c94359f4aa 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -2174,7 +2174,7 @@ expand_expr_stmt_value (exp, want_value, maybe_last)
{
if (! TREE_SIDE_EFFECTS (exp))
{
- if ((extra_warnings || warn_unused_value)
+ if (warn_unused_value
&& !(TREE_CODE (exp) == CONVERT_EXPR
&& VOID_TYPE_P (TREE_TYPE (exp))))
warning_with_file_and_line (emit_filename, emit_lineno,
OpenPOWER on IntegriCloud