Commit 6e1b44bc by Mark Mitchell Committed by Mark Mitchell

mangle.c (mangle_conv_op_name_for_type): Don't use `__op' prefix.

	* mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
	prefix.

From-SVN: r37678
parent dc60a41b
2000-11-22 Mark Mitchell <mark@codesourcery.com> 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 * pt.c (do_decl_instantiate): Explicitly clone constructors and
destructors that haven't already been cloned. destructors that haven't already been cloned.
......
...@@ -2226,15 +2226,7 @@ mangle_thunk (fn_decl, offset, vcall_offset) ...@@ -2226,15 +2226,7 @@ mangle_thunk (fn_decl, offset, vcall_offset)
/* Return an identifier for the mangled unqualified name for a /* Return an identifier for the mangled unqualified name for a
conversion operator to TYPE. This mangling is not specified by the conversion operator to TYPE. This mangling is not specified by the
ABI spec; it is only used internally. 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. */
tree tree
mangle_conv_op_name_for_type (type) mangle_conv_op_name_for_type (type)
...@@ -2245,10 +2237,10 @@ mangle_conv_op_name_for_type (type) ...@@ -2245,10 +2237,10 @@ mangle_conv_op_name_for_type (type)
/* Build the mangling for TYPE. */ /* Build the mangling for TYPE. */
const char *mangled_type = mangle_type_string (type); const char *mangled_type = mangle_type_string (type);
/* Allocate a temporary buffer for the complete name. */ /* 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); + strlen (mangled_type) + 1);
/* Assemble the mangling. */ /* Assemble the mangling. */
strcpy (op_name, OPERATOR_TYPENAME_FORMAT); strcpy (op_name, "operator ");
strcat (op_name, mangled_type); strcat (op_name, mangled_type);
/* Find or create an identifier. */ /* Find or create an identifier. */
identifier = get_identifier (op_name); identifier = get_identifier (op_name);
......
// 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> // Contributed by Nathan Sidwell 21 Nov 1999 <nathan@acm.org>
// make sure __FUNCTION__ and __PRETTY_FUNCTION__ work in member functions // make sure __FUNCTION__ and __PRETTY_FUNCTION__ work in member functions
...@@ -67,7 +67,7 @@ X::operator int () ...@@ -67,7 +67,7 @@ X::operator int ()
printf ("__FUNCTION__ %s\n", function); printf ("__FUNCTION__ %s\n", function);
printf ("__PRETTY_FUNCTION__ %s\n", pretty); printf ("__PRETTY_FUNCTION__ %s\n", pretty);
if (strcmp (function, "__opi")) if (strcmp (function, "operator i"))
bad = true; bad = true;
if (strcmp (pretty, "X::operator int()")) if (strcmp (pretty, "X::operator int()"))
bad = true; bad = true;
......
// Build don't link: // Build don't link:
// crash test - XFAIL *-*-*
// Reported by Harri Porten <porten@tu-harburg.de> // Reported by Harri Porten <porten@tu-harburg.de>
// Simplified for testsuite by Alexandre Oliva // Simplified for testsuite by Alexandre Oliva
struct foo { operator long double(); }; struct foo { operator long double(); };
int bar(int __opr); // gets bogus error - XFAIL *-*-* int bar(int __opr);
int bar(int __ope); // gets bogus error - XFAIL *-*-* int bar(int __ope);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment