summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-06 07:16:32 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-06 07:16:32 +0000
commit43895b7fd2516fe01c2fa9305f19245d9dccdf48 (patch)
treeae671f4b20eac793db0415a318c297e30a0605d3 /gcc
parentbd952ecdfbf177675b243d8e2f6f0c7cc7d6ab5f (diff)
downloadgcc-43895b7fd2516fe01c2fa9305f19245d9dccdf48.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84147 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/decl.c9
2 files changed, 9 insertions, 8 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 2d7f89dcb19..a9dc8578333 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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>
* cp-lang.c (cp_var_mod_type_p): Add extra arg.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 25ecca7ab1c..fbc7dd72890 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8220,13 +8220,6 @@ grokparms (cp_parameter_declarator *first_parm, tree *parms)
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
ignored for function types. */
type = cp_build_qualified_type (type, 0);
@@ -8261,7 +8254,7 @@ grokparms (cp_parameter_declarator *first_parm, tree *parms)
}
if (!any_error && init)
- init = check_default_argument (type, init);
+ init = check_default_argument (decl, init);
else
init = NULL_TREE;
}