Commit ff47d094 by Mark Mitchell Committed by Mark Mitchell

decl.c (store_parm_decls): Don't build cleanups for parameters while processing_template_decl.

	* decl.c (store_parm_decls): Don't build cleanups for parameters
	while processing_template_decl.

From-SVN: r31842
parent de9127c1
2000-02-07 Mark Mitchell <mark@codesourcery.com>
* decl.c (store_parm_decls): Don't build cleanups for parameters
while processing_template_decl.
2000-02-07 Jason Merrill <jason@casey.cygnus.com>
* cp-tree.h (struct saved_scope): Add incomplete field.
......
......@@ -13409,7 +13409,9 @@ store_parm_decls ()
else
cp_error ("parameter `%D' declared void", parm);
cleanup = maybe_build_cleanup (parm);
cleanup = (processing_template_decl
? NULL_TREE
: maybe_build_cleanup (parm));
if (cleanup)
cleanups = tree_cons (parm, cleanup, cleanups);
......
// Build don't link:
// Origin: Mark Mitchell <mark@codesourcery.com>
int i;
struct S
{
~S ()
{
}
};
template <class T>
void f (T, S)
{
i = 0;
}
int main ()
{
i = 1;
f (3, S ());
return i;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment