Open cpplearner opened 3 years ago
I think the current rule ("expression manglings reflect a prefix traversal of the syntactic expression tree") strongly suggests that implicit *this
should never be mangled. And that seems to have been the consensus when this was previously discussed on cxx-abi-dev. I guess compilers just never did this consistently.
@jicama, @zygoloid, what do the implementations think about changing this mangling at this point?
This seems like a bug in GCC (tracked at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98756).
I'd want to fix this in the compiler after we resolve issue #38. The general rule is to mangle the syntactic form, but #38 demonstrates that we need to make an exception for name lookup, since the same name can mean different things in different contexts.
It seems that GCC always includes the implicit
(*this).
in the mangling, Clang includes(*this).
only in some cases (when the member name is non-dependent?), and ICC never does.Which behavior should be specified?