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: [cxx-reflection] PATCH to decltype: Go through semantics analysis


Nathan Sidwell <nathan@codesourcery.com> writes:

| Gabriel Dos Reis wrote:
| 
| > But then, the usual ABI issue: mangling.  This is the same issue as
| > for __typeof__, currently GCC just aborts (which sort of is silly).
| > I invented ad-hoc productions.  I'll appreciate any input from core
| > ABI experts.
| 
| >   +    C++0x extension
| > +    <type>   ::= DT <type>          # decltype (type)
| > +             ::= DT <expression> E  # decltype (expression)
| 
| This is not demangleable. You'll note that sizeof has two manglings
| one for type and one for expr. You need the same here.
| 
| The U prefix will work for decltype (type), but the ABI has no extensible
| way of adding decltype (expr). The demangler needs to know whether it
| is expecting an expr or type. (hm, this shows that the 'v' operator
| mangling won't work for alignof (type)).

Thanks for looking into this.

| I suggest an extensible scheme
| X <digit1> <digit2> <sourcename> <type>...[n1] <expr>...[n2]
                      ^^^^^^^^^^^^

what is this for?

Thanks,

-- Gaby


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