PR c++/11512
commit00fa9079fff8eb65ddbd0dab17e3ec4e6e3bd611
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 Aug 2003 13:32:11 +0000 (16 13:32 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 Aug 2003 13:32:11 +0000 (16 13:32 +0000)
tree0432e7399477735a910c874de61c6edf041c4dbe
parent0785e435c4757f7248b96902a01350c7b2060c32
PR c++/11512
* stmt.c (expand_expr_stmt_value): Don't warn about any void
typed expression.
cp:
PR c++/11512
* cvt.c (convert_to_void): Indicate which side of conditional has
no effects, and rhs of comma operator. Test for no sideeffect
expressions here and always build a convert expr.
* init.c (expand_default_init): Convert the init to void.
* typeck.c (build_x_compound_expr): Do not check for side effects
here.
(build_compound_expr): Do not convert lhs when building a
template.
testsuite:
PR C++/11512
* g++.dg/template/warn1.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70505 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/cvt.c
gcc/cp/init.c
gcc/cp/typeck.c
gcc/stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/warn1.C [new file with mode: 0644]