This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with calling conventions.
- To: mansoor at cybermedia dot co dot in
- Subject: Re: Problem with calling conventions.
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Thu, 30 Dec 1999 10:05:47 +0100
- CC: gcc at gcc dot gnu dot org
- References: <Pine.LNX.4.10.9912241713490.3829-100000@ns1.cybermedia.co.in>
> I have a problem. The following line of code gives me an error when
> compiled by a gcc2.95.2 compiler on AiX 4.3.2.
> int __cdecl foo ();
> I cannot even use __stdcall, for that matter.
> Can anyone please tell me how to specify the calling convention while
> declaring a function ?
The proper way to declare it would be
int foo () __attribute__((cdecl));
However, these function attributes are only supported on i386, or on
PPC targeting Windows NT.
Regards,
Martin