summaryrefslogtreecommitdiff
path: root/gcc/cp/lex.c
diff options
context:
space:
mode:
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>1994-06-03 21:42:31 +0000
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>1994-06-03 21:42:31 +0000
commitddb9bca7cf3eacafdd746e9cef248d9f9ef7a4e6 (patch)
tree2bfb1009d1a11061dfd6aad7e84a40e551c0af50 /gcc/cp/lex.c
parent8431e6285e36d85d61febbce26371c4d253e30dc (diff)
downloadgcc-ddb9bca7cf3eacafdd746e9cef248d9f9ef7a4e6.tar.gz
39th Cygnus<->FSF merge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7439 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r--gcc/cp/lex.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 595ba826667..68f801e1f98 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -1936,15 +1936,17 @@ default_assign_ref_body (bufp, lenp, type, fields)
name = TYPE_NESTED_NAME (btype);
s = IDENTIFIER_POINTER (name);
- tneed = (2 * strlen (s)) + 33;
+ tneed = (2 * strlen (s)) + 42;
if (tgot < tneed)
{
tgot = tneed;
tbuf = (char *) alloca (tgot);
}
- sprintf (tbuf, "%s::operator=((%s%s&)_ctor_arg);", s,
- TYPE_READONLY (type) ? "const " : "", s);
+ sprintf (tbuf, "%s::operator=((%s%s ::%s&)_ctor_arg);", s,
+ TYPE_READONLY (type) ? "const " : "",
+ CLASSTYPE_DECLARED_CLASS (btype) ? "class" : "struct",
+ s);
obstack_grow (&body, tbuf, strlen (tbuf));
}
}
@@ -2101,15 +2103,17 @@ default_copy_constructor_body (bufp, lenp, type, fields)
name = TYPE_NESTED_NAME (btype);
s = IDENTIFIER_POINTER (name);
- tneed = (2 * strlen (s)) + 30;
+ tneed = (2 * strlen (s)) + 39;
if (tgot < tneed)
{
tgot = tneed;
tbuf = (char *) alloca (tgot);
}
- sprintf (tbuf, "%c%s((%s%s&)_ctor_arg)", sep, s,
- TYPE_READONLY (type) ? "const " : "", s);
+ sprintf (tbuf, "%c%s((%s%s ::%s&)_ctor_arg)", sep, s,
+ TYPE_READONLY (type) ? "const " : "",
+ CLASSTYPE_DECLARED_CLASS (btype) ? "class" : "struct",
+ s);
sep = ',';
obstack_grow (&prologue, tbuf, strlen (tbuf));
}