This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Function attributes and x32, x64
- From: Edward Diener <eldlistmailingz at tropicsoft dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 1 Feb 2020 06:06:55 -0500
- Subject: Function attributes and x32, x64
Given the code:
class cbase;
int main()
{
typedef int __attribute__ ((__stdcall__)) (cbase::* atype)();
typedef int __attribute__ ((__cdecl__)) (cbase::* btype)();
typedef int __attribute__ ((__fastcall__)) (cbase::* ctype)();
typedef int __attribute__ ((__thiscall__)) (cbase::* dtype)();
return 0;
}
If I compile this for x64 (-m64) in gcc-9.2 I receive no errors or
warnings. Yet
https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html tells me
that all four are only for x86-32 targets. Is the documentation wrong,
is this a bug in gcc-9.2, or have I missed something ?