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][libstdc++ patch][c++ patch] Update mangling and demangling for rvalue references


"Doug Gregor" <doug.gregor@gmail.com> writes:

> Index: include/demangle.h
> ===================================================================
> --- include/demangle.h	(revision 126081)
> +++ include/demangle.h	(working copy)
> @@ -359,7 +359,10 @@ enum demangle_component_type
>       using 'n' instead of '-', we want a way to indicate a negative
>       number which involves neither modifying the mangled string nor
>       allocating a new copy of the literal in memory.  */
> -  DEMANGLE_COMPONENT_LITERAL_NEG
> +  DEMANGLE_COMPONENT_LITERAL_NEG,
> +  /* C++0x: An rvalue reference.  The one subtree is the type which is
> +     being referenced.  */
> +  DEMANGLE_COMPONENT_RVALUE_REFERENCE
>  };

Please put this up just after DEMANGLE_COMPONENT_REFERENCE.


> Index: libiberty/cp-demangle.c
> ===================================================================
> --- libiberty/cp-demangle.c	(revision 126081)
> +++ libiberty/cp-demangle.c	(working copy)
> @@ -1726,6 +1730,7 @@ d_ctor_dtor_name (struct d_info *di)
>            ::= <CV-qualifiers> <type>
>            ::= P <type>
>            ::= R <type>
> +          ::= RR <type> (C++0x)
>            ::= C <type>
>            ::= G <type>
>            ::= U <source-name> <type>

I think you mean O here, not RR.

> @@ -1901,7 +1912,7 @@ cplus_demangle_type (struct d_info *di)
>      case 'R':
>        d_advance (di, 1);
>        ret = d_make_comp (di, DEMANGLE_COMPONENT_REFERENCE,
> -			 cplus_demangle_type (di), NULL);
> +                         cplus_demangle_type (di), NULL);
>        break;
>  
>      case 'C':

This is only a whitespace change, I assume.


As far as I'm concerned, this patch is OK with those changes.  But get
one of the C++ maintainers to approve the basic approach first.

Thanks.

Ian


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