re PR c++/11512 (Spurious warning for comma-operator in templates)
authorNathan Sidwell <nathan@codesourcery.com>
Sat, 16 Aug 2003 13:32:11 +0000 (13:32 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Sat, 16 Aug 2003 13:32:11 +0000 (13:32 +0000)
commite895113a67a061c20fbb16be60c2d90eb6ba084a
tree0432e7399477735a910c874de61c6edf041c4dbe
parente767b5be438a67c59f8f23b6214fcbb7183a8092
re PR c++/11512 (Spurious warning for comma-operator in templates)

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.

From-SVN: r70505
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]