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]

Demangle _fill_comp fix


cplus_demangle_fill_component and d_make_comp test for opposite things: the
former tests that one-argument components have at most one argument, the
latter tests that one-argument components have at least one argument.  The
change caused my code to trigger a bug in d_make_comp:
DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE was listed as one-argument but
actually takes two.

OK?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2004-01-13  Daniel Jacobowitz  <drow@mvista.com>

	* cp-demangle.c (d_make_comp): DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE
	takes two parameters.
	* cp-demint.c (cplus_demangle_fill_component): Likewise.

Index: cp-demangle.c
===================================================================
RCS file: /cvs/src/src/libiberty/cp-demangle.c,v
retrieving revision 1.27.4.5
diff -u -p -r1.27.4.5 cp-demangle.c
--- cp-demangle.c	13 Jan 2004 16:12:17 -0000	1.27.4.5
+++ cp-demangle.c	13 Jan 2004 17:57:42 -0000
@@ -751,6 +751,7 @@ d_make_comp (di, type, left, right)
     case DEMANGLE_COMPONENT_LOCAL_NAME:
     case DEMANGLE_COMPONENT_TYPED_NAME:
     case DEMANGLE_COMPONENT_TEMPLATE:
+    case DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE:
     case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
     case DEMANGLE_COMPONENT_PTRMEM_TYPE:
     case DEMANGLE_COMPONENT_UNARY:
@@ -768,7 +769,6 @@ d_make_comp (di, type, left, right)
       /* These types only require one parameter.  */
     case DEMANGLE_COMPONENT_VTABLE:
     case DEMANGLE_COMPONENT_VTT:
-    case DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE:
     case DEMANGLE_COMPONENT_TYPEINFO:
     case DEMANGLE_COMPONENT_TYPEINFO_NAME:
     case DEMANGLE_COMPONENT_TYPEINFO_FN:
Index: cp-demint.c
===================================================================
RCS file: /cvs/src/src/libiberty/cp-demint.c,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 cp-demint.c
--- cp-demint.c	13 Jan 2004 16:12:17 -0000	1.1.2.1
+++ cp-demint.c	13 Jan 2004 17:57:42 -0000
@@ -70,6 +70,7 @@ cplus_demangle_fill_component (p, type, 
     case DEMANGLE_COMPONENT_LOCAL_NAME:
     case DEMANGLE_COMPONENT_TYPED_NAME:
     case DEMANGLE_COMPONENT_TEMPLATE:
+    case DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE:
     case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
     case DEMANGLE_COMPONENT_FUNCTION_TYPE:
     case DEMANGLE_COMPONENT_ARRAY_TYPE:
@@ -89,7 +90,6 @@ cplus_demangle_fill_component (p, type, 
       /* These component types only have one subtree.  */
     case DEMANGLE_COMPONENT_VTABLE:
     case DEMANGLE_COMPONENT_VTT:
-    case DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE:
     case DEMANGLE_COMPONENT_TYPEINFO:
     case DEMANGLE_COMPONENT_TYPEINFO_NAME:
     case DEMANGLE_COMPONENT_TYPEINFO_FN:


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