re PR c++/11957 (wrong "warning: statement has no effect")
authorNathan Sidwell <nathan@codesourcery.com>
Mon, 18 Aug 2003 12:55:04 +0000 (12:55 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 18 Aug 2003 12:55:04 +0000 (12:55 +0000)
commit303b74068a5667b688d192bc96829989f5bafc9f
tree648c5a079b6d873effc48807fb0fab2d455cdd19
parenta2507277ed143a8f75f5a60f43541fc3d714aede
re PR c++/11957 (wrong "warning: statement has no effect")

cp:
PR c++/11957
* cp-tree.h (finish_stmt_expr): Add bool parameter.
* init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
adjust the stmt_expr here.
(build_vec_init): Use finish_stmt_expr_expr, convert result to
array type.
* parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
call.
* pt.c (tsubst_copy): Likewise.
* semantics.c (finish_stmt_expr): Add parameter.
testsuite:
PR c++/11957
* g++.dg/warn/noeffect1.C: New test.

From-SVN: r70541
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/init.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c