From 1f06b26767080802e6d5213dd9a9dbddd7430b0d Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Tue, 14 Oct 1997 19:12:56 +0000 Subject: [PATCH] decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it, so as to avoid incorrect manglings. Tue Oct 14 12:01:00 1997 Mark Mitchell * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it, so as to avoid incorrect manglings. * method.c (build_decl_overload_real): Don't mangle return types for constructors. From-SVN: r15904 --- gcc/cp/ChangeLog | 7 +++++++ gcc/cp/decl.c | 1 + gcc/cp/method.c | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index eb917179cba..d5e98a59f04 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +Tue Oct 14 12:01:00 1997 Mark Mitchell + + * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it, + so as to avoid incorrect manglings. + * method.c (build_decl_overload_real): Don't mangle return types + for constructors. + Tue Oct 14 11:46:14 1997 Jason Merrill * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec, diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index ad80b45cabf..6f1007cda21 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -2167,6 +2167,7 @@ pushtag (name, type, globalize) DECL_IGNORED_P (d) = 1; TYPE_CONTEXT (type) = DECL_CONTEXT (d); + DECL_ASSEMBLER_NAME (d) = DECL_NAME (d); DECL_ASSEMBLER_NAME (d) = get_identifier (build_overload_name (type, 1, 1)); } diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 3dc46d09005..38004f8c482 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1194,7 +1194,7 @@ build_decl_overload_real (dname, parms, ret_type, tparms, targs, DEALLOCATE_TYPEVEC (parms); } - if (ret_type != NULL_TREE) + if (ret_type != NULL_TREE && for_method != 2) { /* Add the return type. */ OB_PUTC ('_'); -- 2.30.2