Discussion:
how to disable __thiscall on MinGW-gcc-4.7.x ?
niXman
2012-05-09 12:16:20 UTC
Permalink
Hello list!

According to the changes in the gcc-4.7.0 [1]: Windows x86 targets are
using the __ thiscall calling convention for C++ class-member
functions.

The question is how to disable this?

Thanks.

[1] http://gcc.gnu.org/gcc-4.7/changes.html
--
Regards,
  niXman
Václav Zeman
2012-05-09 13:26:33 UTC
Permalink
Post by niXman
Hello list!
According to the changes in the gcc-4.7.0 [1]: Windows x86 targets are
using the __thiscall calling convention for C++ class-member
functions.
The question is how to disable this?
It is the platforms ABI, why would you want to disable it?
Post by niXman
Thanks.
[1] http://gcc.gnu.org/gcc-4.7/changes.html
--
VZ
niXman
2012-05-09 13:33:53 UTC
Permalink
Post by Václav Zeman
It is the platforms ABI, why would you want to disable it?
If it is the platforms ABI, why before version 4.7.x this was not required?
I do not want to use the thiscall in 4.7.x version, and the next versions.
--
Regards,
  niXman
niXman
2012-05-10 13:44:21 UTC
Permalink
ping?
--
Regards,
  niXman
JonY
2012-05-12 15:00:13 UTC
Permalink
Post by niXman
Post by Václav Zeman
It is the platforms ABI, why would you want to disable it?
If it is the platforms ABI, why before version 4.7.x this was not required?
I do not want to use the thiscall in 4.7.x version, and the next versions.
This is an ABI change, a move to make GCC closer to C++ ABI on Windows
(namely MSVC).
Paweł Sikora
2012-05-12 18:29:12 UTC
Permalink
Post by JonY
Post by niXman
Post by Václav Zeman
It is the platforms ABI, why would you want to disable it?
If it is the platforms ABI, why before version 4.7.x this was not required?
I do not want to use the thiscall in 4.7.x version, and the next versions.
This is an ABI change, a move to make GCC closer to C++ ABI on Windows
(namely MSVC).
are there any benefits from this move? iirc gcc users can't call msvc-c++
parts directly due to different objects layout and name mangling.
niXman
2012-05-13 01:47:35 UTC
Permalink
Post by Paweł Sikora
are there any benefits from this move? iirc gcc users can't call msvc-c++
parts directly due to different objects layout and name mangling.
In this case, I do not understand the meaning in __ thiscall by default.
Also, I do not understand why this feature is not disabled. Someone
must have enabled it. How can I disable it?
--
Regards,
  niXman
JonY
2012-05-13 03:37:28 UTC
Permalink
Post by niXman
Post by Paweł Sikora
are there any benefits from this move? iirc gcc users can't call msvc-c++
parts directly due to different objects layout and name mangling.
There is an ongoing effort to make them compatible, though not any time
soon, this is one of the first steps.
Post by niXman
In this case, I do not understand the meaning in __ thiscall by default.
Also, I do not understand why this feature is not disabled. Someone
must have enabled it. How can I disable it?
I don't think it can be disabled. You should revert to an older version
compatible with your compiled libraries.

As a side note, C++ is a very complex language, you should not assume
the objects are compatible if you mix compilers, even if it's a
different version of the same compiler.

Loading...