This is the mail archive of the gcc@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: C++ ABI: Mangling of call_expr


Andreas Schwab <schwab@suse.de> wrote:

>>> But what is a CALL_EXPR? Its two-letter mangled name is "cl", but it
>>> certainly can't be either unary, binary, or trinary. In fact, in
>>> operators.def, it is defined with arity "-1", which means "any arity is
>>> allowed". But then, I can't see which production is supposed to use.
>
> A function call is actually a postfix expression.

Exactly. I cannot find any indication about how to mangle any non-trivial
postfix expression. If you try to mangle:

T::my_type

it works (it's indeed documented in the ABI, it's "srT_7my_type" (assuming T
as first template parameter). Then you try with:

T::my_type()

and it segfaults, and the document gives no clue as how to mangle it.
Function calls are among the things it does not accept, and I have no clue
about how to implement them, since it's an "operator" with a variable number
of arguments.

Giovanni Bajo


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