revert: re PR tree-optimization/16115 (double-destruction problem with argument passing via temporary (breaks auto_ptr))
Revert: 2004-06-24 Jason Merrill <jason@redhat.com> PR c++/16115 * decl.c (grokparms): Give the PARM_DECL reference type if the parameter is passed by invisible reference. From-SVN: r84147
This commit is contained in:
parent
4404cf7dd9
commit
a95d27c83b
|
@ -1,3 +1,11 @@
|
||||||
|
2004-07-06 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
|
Revert:
|
||||||
|
2004-06-24 Jason Merrill <jason@redhat.com>
|
||||||
|
PR c++/16115
|
||||||
|
* decl.c (grokparms): Give the PARM_DECL reference type if the
|
||||||
|
parameter is passed by invisible reference.
|
||||||
|
|
||||||
2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||||
|
|
||||||
* cp-lang.c (cp_var_mod_type_p): Add extra arg.
|
* cp-lang.c (cp_var_mod_type_p): Add extra arg.
|
||||||
|
|
|
@ -8220,13 +8220,6 @@ grokparms (cp_parameter_declarator *first_parm, tree *parms)
|
||||||
|
|
||||||
if (type != error_mark_node)
|
if (type != error_mark_node)
|
||||||
{
|
{
|
||||||
/* If this type is passed by invisible reference, make the PARM_DECL
|
|
||||||
reflect that so that alias analysis knows that the actual object
|
|
||||||
is external to the function. */
|
|
||||||
if (TREE_ADDRESSABLE (type))
|
|
||||||
decl = build_decl (PARM_DECL, DECL_NAME (decl),
|
|
||||||
build_reference_type (type));
|
|
||||||
|
|
||||||
/* Top-level qualifiers on the parameters are
|
/* Top-level qualifiers on the parameters are
|
||||||
ignored for function types. */
|
ignored for function types. */
|
||||||
type = cp_build_qualified_type (type, 0);
|
type = cp_build_qualified_type (type, 0);
|
||||||
|
@ -8261,7 +8254,7 @@ grokparms (cp_parameter_declarator *first_parm, tree *parms)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!any_error && init)
|
if (!any_error && init)
|
||||||
init = check_default_argument (type, init);
|
init = check_default_argument (decl, init);
|
||||||
else
|
else
|
||||||
init = NULL_TREE;
|
init = NULL_TREE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue