This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [cxx-reflection] PATCH to decltype: Go through semantics analysis
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 19 Jun 2003 18:11:22 +0200
- Subject: Re: [cxx-reflection] PATCH to decltype: Go through semantics analysis
- Organization: Integrable Solutions
- References: <m31xxqql0c.fsf@uniton.integrable-solutions.net><3EF1DF65.30902@codesourcery.com>
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