This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR libstdc++/13045


On Thu, Dec 04, 2003 at 07:30:26PM +0100, Carlo Wood wrote:
> On Wed, Dec 03, 2003 at 11:00:20PM -0600, Benjamin Kosnik wrote:
> > 
> > >2003-12-03  Carlo Wood  <carlo@alinoe.com>
> > >	PR libstdc++/13045
> > >	* bits/demangle.h
> > >	namespace __gnu_cxx::demangler
> > >	(session<Allocator>::decode_type_with_postfix): Put the postfix
> > >	of the return type of (member) functions after the function
> > >	instead of after the return type.  Also, put a space after the
> > >	prefix of qualified function pointers: "int (* const<space>".
> > 
> > This is fine, thanks. 

This patch belongs to the above.
Causes _ZNK1C1fIiEEPFivEv to be demangled in the same way
as Ians demangler: int (* C::f<int>() const)()

Committed as trivial.



Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/ChangeLog,v
retrieving revision 1.2174
diff -u -d -p -r1.2174 ChangeLog
--- ChangeLog	19 Dec 2003 20:44:17 -0000	1.2174
+++ ChangeLog	19 Dec 2003 23:13:59 -0000
@@ -1,3 +1,11 @@
+2003-12-20  Carlo Wood  <carlo@alinoe.com>
+
+	* bits/demangle.h
+	namespace __gnu_cxx::demangler
+	(session<Allocator>::decode_encoding): Put the postfix
+	of the return type of (member) functions after the function
+	instead of after the return type.
+
 2003-12-19  Jerry Quinn  <jlquinn@optonline.net>
 
         * include/bits/locale_facet.h
Index: include/bits/demangle.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/demangle.h,v
retrieving revision 1.15
diff -u -d -p -r1.15 demangle.h
--- include/bits/demangle.h	18 Dec 2003 18:35:37 -0000	1.15
+++ include/bits/demangle.h	19 Dec 2003 23:14:01 -0000
@@ -2665,12 +2665,14 @@ namespace __gnu_cxx
 	  return demangler_session.M_pos;
 	}
 	// Must have been a <function name>.
+	string_type return_type_postfix;
 	if (demangler_session.M_name_is_template
 	    && !(demangler_session.M_name_is_cdtor
 	         || demangler_session.M_name_is_conversion_operator))
 	{
-	  if (!demangler_session.decode_type(output))
-	      // Return type of function
+	  // Return type of function
+	  if (!demangler_session.decode_type_with_postfix(output,
+	      return_type_postfix))
 	    return INT_MIN;
 	  output += ' ';
 	}
@@ -2678,6 +2680,7 @@ namespace __gnu_cxx
 	if (!demangler_session.decode_bare_function_type(output))
 	  return INT_MIN;
 	output += nested_name_qualifiers;
+	output += return_type_postfix;
 	return demangler_session.M_pos;
       }
 

-- 
Carlo Wood <carlo@alinoe.com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]