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: Regression with "Re: C++ PATCH to decltype mangling"


The problem was that I only tested the compiler changes, not the demangler. Fixed thus.


Index: libiberty/ChangeLog
===================================================================
*** libiberty/ChangeLog	(revision 142799)
--- libiberty/ChangeLog	(working copy)
***************
*** 1,3 ****
--- 1,9 ----
+ 2008-12-18  Jason Merrill  <jason@redhat.com>
+ 
+ 	PR c++/38561
+ 	* cp-demangle.c (d_expression, d_print_comp): Revert
+ 	cast changes.
+ 
  2008-12-17  Jason Merrill  <jason@redhat.com>
  
  	* cp-demangle.c (d_expression): Handle rvalue stubs too.
Index: libiberty/cp-demangle.c
===================================================================
*** libiberty/cp-demangle.c	(revision 142799)
--- libiberty/cp-demangle.c	(working copy)
*************** d_expression (struct d_info *di)
*** 2609,2630 ****
  	  args = op->u.s_extended_operator.args;
  	  break;
  	case DEMANGLE_COMPONENT_CAST:
! 	  args = 1;
  	  break;
  	}
  
        switch (args)
  	{
  	case 1:
! 	  {
! 	    struct demangle_component *operand;
! 	    if (op->type == DEMANGLE_COMPONENT_CAST)
! 	      operand = d_exprlist (di);
! 	    else
! 	      operand = d_expression (di);
! 	    return d_make_comp (di, DEMANGLE_COMPONENT_UNARY, op,
! 				operand);
! 	  }
  	case 2:
  	  {
  	    struct demangle_component *left;
--- 2609,2628 ----
  	  args = op->u.s_extended_operator.args;
  	  break;
  	case DEMANGLE_COMPONENT_CAST:
! 	  if (d_peek_char (di) == 'v')
! 	    /* T() encoded as an operand of void.  */
! 	    return d_make_comp (di, DEMANGLE_COMPONENT_UNARY, op,
! 				cplus_demangle_type (di));
! 	  else
! 	    args = 1;
  	  break;
  	}
  
        switch (args)
  	{
  	case 1:
! 	  return d_make_comp (di, DEMANGLE_COMPONENT_UNARY, op,
! 			      d_expression (di));
  	case 2:
  	  {
  	    struct demangle_component *left;
*************** d_print_comp (struct d_print_info *dpi,
*** 3809,3815 ****
  	  d_print_cast (dpi, d_left (dc));
  	  d_append_char (dpi, ')');
  	}
!       d_print_subexpr (dpi, d_right (dc));
        return;
  
      case DEMANGLE_COMPONENT_BINARY:
--- 3807,3818 ----
  	  d_print_cast (dpi, d_left (dc));
  	  d_append_char (dpi, ')');
  	}
!       if (d_left (dc)->type == DEMANGLE_COMPONENT_CAST
! 	  && d_right (dc)->type == DEMANGLE_COMPONENT_BUILTIN_TYPE)
! 	/* type() -- FIXME what about type(multiple,args) */
! 	d_append_string (dpi, "()");
!       else
! 	d_print_subexpr (dpi, d_right (dc));
        return;
  
      case DEMANGLE_COMPONENT_BINARY:

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