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]

Re: Calling conventions used by gcc


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]