This is the mail archive of the gcc-help@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]

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 ?


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