This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
C++ Bug, recent template changes
- To: mark at codesourcery dot com, egcs-bugs at egcs dot cygnus dot com
- Subject: C++ Bug, recent template changes
- From: Nathan Sidwell <nathan at acm dot org>
- Date: Sun, 22 Aug 1999 18:18:26 +0100
- Organization: University of Bristol
- Reply-To: nathan at compsci dot bristol dot ac dot uk
Hi,
1999-08-16 Mark Mitchell <mark@codesourcery.com>
* pt.c (do_pushlevel): Move to semantics.c.
(do_poplevel): Likewise.
(tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
(tsubst_expr): Don't expand all the way to RTL here. Handle
RETURN_INIT and CTOR_INITIALIZER.
(instantiate_decl): Call expand_body after tsubst'ing into
DECL_SAVED_TREE.
introduced the following
case STMT_EXPR:
/* This processing should really occur in tsubst_expr, However,
tsubst_expr does not recurse into expressions, since it
assumes that there aren't any statements inside them.
Instead, it simply calls build_expr_from_tree. So, we need
to expand the STMT_EXPR here. */
if (!processing_template_decl)
{
tree rtl_expr = begin_stmt_expr ();
tree block = tsubst_expr (STMT_EXPR_STMT (t), args,
complain, in_decl);
r = finish_stmt_expr (rtl_expr, block);
}
return r;
which evokes an 'r used uninitialized' warning.
r _does_ appear to be uninitialized at the return point.
nathan
--
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
I have seen the death of PhotoShop -- it is called GIMP
nathan@acm.org http://www.cs.bris.ac.uk/~nathan/ nathan@cs.bris.ac.uk