diff options
| author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-22 23:53:03 +0000 |
|---|---|---|
| committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-22 23:53:03 +0000 |
| commit | e22d1c95c196fa06e02c281e92e6944c7f7ead09 (patch) | |
| tree | 47df32fdb771da038d9188aff5ddc47d0f82c3af /gcc | |
| parent | c05d01e2fe4256b73ff786066f9bd3d0f6a2fb69 (diff) | |
| download | ppe42-gcc-e22d1c95c196fa06e02c281e92e6944c7f7ead09.tar.gz ppe42-gcc-e22d1c95c196fa06e02c281e92e6944c7f7ead09.zip | |
* mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
prefix.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37678 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
| -rw-r--r-- | gcc/cp/mangle.c | 14 | ||||
| -rw-r--r-- | gcc/testsuite/g++.old-deja/g++.ext/pretty2.C | 4 | ||||
| -rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/decl4.C | 5 |
4 files changed, 10 insertions, 16 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ef02d3d889a..bbc26de6274 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2000-11-22 Mark Mitchell <mark@codesourcery.com> + * mangle.c (mangle_conv_op_name_for_type): Don't use `__op' + prefix. + * pt.c (do_decl_instantiate): Explicitly clone constructors and destructors that haven't already been cloned. diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index d4ffaff26c5..33eeefc447a 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -2226,15 +2226,7 @@ mangle_thunk (fn_decl, offset, vcall_offset) /* Return an identifier for the mangled unqualified name for a conversion operator to TYPE. This mangling is not specified by the - ABI spec; it is only used internally. - - For compatibility with existing conversion operator mechanisms, - the mangled form is `__op<type>' where <type> is the mangled - representation of TYPE. - - FIXME: Though identifiers with starting with __op are reserved for - the implementation, it would eventually be nice to use inaccessible - names for these operators. */ + ABI spec; it is only used internally. */ tree mangle_conv_op_name_for_type (type) @@ -2245,10 +2237,10 @@ mangle_conv_op_name_for_type (type) /* Build the mangling for TYPE. */ const char *mangled_type = mangle_type_string (type); /* Allocate a temporary buffer for the complete name. */ - char *op_name = (char *) xmalloc (strlen (OPERATOR_TYPENAME_FORMAT) + char *op_name = (char *) xmalloc (strlen ("operator ") + strlen (mangled_type) + 1); /* Assemble the mangling. */ - strcpy (op_name, OPERATOR_TYPENAME_FORMAT); + strcpy (op_name, "operator "); strcat (op_name, mangled_type); /* Find or create an identifier. */ identifier = get_identifier (op_name); diff --git a/gcc/testsuite/g++.old-deja/g++.ext/pretty2.C b/gcc/testsuite/g++.old-deja/g++.ext/pretty2.C index d48d5fa7b46..c0c953a0539 100644 --- a/gcc/testsuite/g++.old-deja/g++.ext/pretty2.C +++ b/gcc/testsuite/g++.old-deja/g++.ext/pretty2.C @@ -1,4 +1,4 @@ -// Copyright (C) 1999 Free Software Foundation, Inc. +// Copyright (C) 1999, 2000 Free Software Foundation, Inc. // Contributed by Nathan Sidwell 21 Nov 1999 <nathan@acm.org> // make sure __FUNCTION__ and __PRETTY_FUNCTION__ work in member functions @@ -67,7 +67,7 @@ X::operator int () printf ("__FUNCTION__ %s\n", function); printf ("__PRETTY_FUNCTION__ %s\n", pretty); - if (strcmp (function, "__opi")) + if (strcmp (function, "operator i")) bad = true; if (strcmp (pretty, "X::operator int()")) bad = true; diff --git a/gcc/testsuite/g++.old-deja/g++.other/decl4.C b/gcc/testsuite/g++.old-deja/g++.other/decl4.C index d29a181db57..c37be1c2778 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/decl4.C +++ b/gcc/testsuite/g++.old-deja/g++.other/decl4.C @@ -1,9 +1,8 @@ // Build don't link: -// crash test - XFAIL *-*-* // Reported by Harri Porten <porten@tu-harburg.de> // Simplified for testsuite by Alexandre Oliva struct foo { operator long double(); }; -int bar(int __opr); // gets bogus error - XFAIL *-*-* -int bar(int __ope); // gets bogus error - XFAIL *-*-* +int bar(int __opr); +int bar(int __ope); |

