Commit 5c67ba02 by Marc Glisse Committed by Marc Glisse

re PR c++/58950 (Missing "statement has no effect")

2014-01-03  Marc Glisse  <marc.glisse@inria.fr>

	PR c++/58950
gcc/cp/
	* cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
gcc/testsuite/
	* g++.dg/pr58950.C: New file.

From-SVN: r206325
parent 54a990d3
2014-01-03 Marc Glisse <marc.glisse@inria.fr>
PR c++/58950
* cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
2014-01-03 Tobias Burnus <burnus@net-b.de> 2014-01-03 Tobias Burnus <burnus@net-b.de>
PR c++/58567 PR c++/58567
......
...@@ -1403,7 +1403,9 @@ convert_to_void (tree expr, impl_conv_void implicit, tsubst_flags_t complain) ...@@ -1403,7 +1403,9 @@ convert_to_void (tree expr, impl_conv_void implicit, tsubst_flags_t complain)
|| code == PREDECREMENT_EXPR || code == PREDECREMENT_EXPR
|| code == PREINCREMENT_EXPR || code == PREINCREMENT_EXPR
|| code == POSTDECREMENT_EXPR || code == POSTDECREMENT_EXPR
|| code == POSTINCREMENT_EXPR))) || code == POSTINCREMENT_EXPR))
|| code == VEC_PERM_EXPR
|| code == VEC_COND_EXPR)
&& (complain & tf_warning)) && (complain & tf_warning))
warning_at (loc, OPT_Wunused_value, "value computed is not used"); warning_at (loc, OPT_Wunused_value, "value computed is not used");
} }
......
2014-01-03 Marc Glisse <marc.glisse@inria.fr>
PR c++/58950
* g++.dg/pr58950.C: New file.
2014-01-03 Tobias Burnus <burnus@net-b.de> 2014-01-03 Tobias Burnus <burnus@net-b.de>
PR c++/58567 PR c++/58567
......
/* { dg-do compile } */
/* { dg-options "-Wall" } */
void f(){
int i __attribute__((vector_size(2*sizeof(int)))) = { 2, 3 };
__builtin_shuffle (i, i); /* { dg-warning "value computed is not used" } */
++i?1:0; /* { dg-warning "value computed is not used" } */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment