This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Really obscure C++ mangling error with -fnew-abi
> spec> There are two exceptions that appear to be substitution
> spec> candidates from the grammar, but are explicitly excluded:
> spec> ... function and operator names other than extern "C"
> spec> functions.
>
> I think that comment is simply out-of-date. It should be removed.
It's not a comment; it's a normative statement; it says that the
function name, although a name, is not added to the compression table.
> The function name can appear later in the mangling, for instance in
> a template argument, as you point out. But the name of the function
> is not enough to meet the `entities that would appear in a symbol
> table' test.
The "entities appearing in syntax tables" statement is a non-normative
remark, though. The function certainly appears in the syntax table (at
least in gcc, and in any other compiler).
I think that the name of a template is (since you can't
> overload based on template arguments... phew!).
>
> Martin> However, the exception appears to apply to the
> Martin> <function name> in an <encoding> only.
>
> The grammar in the spec as currently posted is out-of-date too.
Well, <function name> is still part of <encoding>...
Regards,
Martin