I want to call a C++ constructor from another language, and need to know what arguments to give it. I think it should be the stated arguments and the "this" pointer. But does the "this" pointer come first or last, in Gnu G++? And are there any other hidden arguments than the "this" pointer?
Other issues such as mangled names are not involved in this question as I already have those issues solved. This question is only about the arguments to a constructor. And the specific language I'm using is not an issue either, as it's a language under development, and this question applies to non-C++ languages in general, not just to a specific language.
Edited to add: This is for an Intel CPU using G++ conventions. That should answer the question of what ABI is involved.
As for "extern C" this is not C++ code. It calls C++ code, but since it's not C++ code itself, it would be meaningless to use "extern C". Also, the C++ code it calls has to be used as-is, without adding stuff to it such as "extern C".
What I'm looking for is not an exact formal definition of calling conventions. I just want some clues to experiment with. Such as, how common is it for C++ compilers to put the "this" pointer at positions other than the first argument? And how common is it for there to be other hidden arguments than the "this" pointer. And if the "this" pointer is not first, is it nearly always last, or is it sometimes in the middle? Etc.