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]

cplus-dem.c patch


I've added this patch to egcs. It fixes a slight problem (well, and abort
is really that slight I guess :-) when demangling something
like 'volatile unsigned char'. We were skipping unsigned and volatile
markers sometimes.

Andrew

Fri Dec 18 16:11:43 EST 1998  Andrew MacLeod  <amacleod@cygnus.com>

        * cplus-dem.c (demangle_fund_type): Process CV and u codes before
        bumping the pointer we read from. Also prepend these codes,
        as we do in other places.
     

Index: cplus-dem.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libiberty/cplus-dem.c,v
retrieving revision 1.35
diff -c -p -r1.35 cplus-dem.c
*** cplus-dem.c	1998/12/07 22:21:45	1.35
--- cplus-dem.c	1998/12/18 14:51:10
*************** demangle_fund_type (work, mangled, resul
*** 3153,3164 ****
  	case 'C':
  	case 'V':
  	case 'u':
- 	  (*mangled)++;
  	  if (PRINT_ANSI_QUALIFIERS)
  	    {
! 	      APPEND_BLANK (result);
! 	      string_append (result, demangle_qualifier (**mangled));
  	    }
  	  break;
  	case 'U':
  	  (*mangled)++;
--- 3153,3165 ----
  	case 'C':
  	case 'V':
  	case 'u':
  	  if (PRINT_ANSI_QUALIFIERS)
  	    {
!               if (!STRING_EMPTY (result))
!                 string_prepend (result, " ");
! 	      string_prepend (result, demangle_qualifier (**mangled));
  	    }
+ 	  (*mangled)++;
  	  break;
  	case 'U':
  	  (*mangled)++;


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