This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12037] [3.4 Regression] Spurious "statement has no effect" in templates
- From: "nathan at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Sep 2003 08:22:28 -0000
- Subject: [Bug c++/12037] [3.4 Regression] Spurious "statement has no effect" in templates
- References: <20030822222052.12037.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12037
nathan at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From nathan at gcc dot gnu dot org 2003-09-05 08:22 -------
2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
PR c++/12037
* cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
(build_min_non_dep): Declare.
* tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
(build_min_non_dep): New.
* cvt.c (convert_to_void): Don't explicitly copy
TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
* call.c (build_new_method_call): Use build_min_non_dep.
* decl2.c (grok_array_decl): Likewise.
(build_offset_ref_call_from_tree): Likewise.
* typeck.c (finish_class_member_access_expr,
build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
build_x_conditional_expr, build_x_compound_expr): Likewise.
(build_static_cast, build_reinterpret_cast,
build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
* typeck2.c (build_x_arrow): Use build_min_non_dep.
(build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
template.
* rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
(build_dynamic_cast): Set TREE_SIDE_EFFECTS.
* pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.