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
This commit is contained in:
parent
de9127c1b7
commit
ff47d09463
@ -1,3 +1,8 @@
|
||||
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);
|
||||
|
24
gcc/testsuite/g++.old-deja/g++.pt/codegen1.C
Normal file
24
gcc/testsuite/g++.old-deja/g++.pt/codegen1.C
Normal file
@ -0,0 +1,24 @@
|
||||
// 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user