Re: Calling conventions used by gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Anders Schau Knatten wrote:

Yes, but one architecture can have several calling conventions, like stdcall or cdecl. It is then up to the compiler to choose one of these. The question is which one is used by gcc. I would also like to be able to specify calling conventions in the function prototypes, but so far I have been unsuccessfull. I have tried things like
extern "C" float __stdcall square_(float* x)
and
extern "C" float square_(float* x) __attribute__ ((__cdecl));
but they give me "syntax error" and "`__cdecl' attribute directive ignored" respectively.

Most of the discussion on calling conventions out there seem to focus on x86 or other architectures, and very few on IA64.

gcc depends on binutils to implement the ABI. I never heard of anyone attempting to implement stdcall on IA-64; Microsoft decided to obsolete it prior to implementing IA-64. Even at my age, this seems like ancient history. I suppose both history and binutils are somewhat Off Topic here.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux