* Re: Problem with calling conventions.
@ 1999-12-24 6:28 Michael Meissner
1999-12-31 23:54 ` Michael Meissner
0 siblings, 1 reply; 8+ messages in thread
From: Michael Meissner @ 1999-12-24 6:28 UTC (permalink / raw)
To: gcc, mansoor
| Hello, Unix Gurus,
| 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 ?
Those are Windows specific. AIX only supports one ABI, so there is no need to
have keywords to use an alternate ABi.
--
Michael Meissner, Cygnus Solutions
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886
email: meissner@cygnus.com phone: 978-486-9304 fax: 978-692-4482
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with calling conventions.
1999-12-24 6:28 Problem with calling conventions Michael Meissner
@ 1999-12-31 23:54 ` Michael Meissner
0 siblings, 0 replies; 8+ messages in thread
From: Michael Meissner @ 1999-12-31 23:54 UTC (permalink / raw)
To: gcc, mansoor
| Hello, Unix Gurus,
| 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 ?
Those are Windows specific. AIX only supports one ABI, so there is no need to
have keywords to use an alternate ABi.
--
Michael Meissner, Cygnus Solutions
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886
email: meissner@cygnus.com phone: 978-486-9304 fax: 978-692-4482
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with calling conventions.
1999-12-30 1:19 ` Martin v. Loewis
@ 1999-12-31 23:54 ` Martin v. Loewis
0 siblings, 0 replies; 8+ messages in thread
From: Martin v. Loewis @ 1999-12-31 23:54 UTC (permalink / raw)
To: mansoor; +Cc: gcc
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with calling conventions.
1999-12-24 4:47 ` Erik Mouw
@ 1999-12-31 23:54 ` Erik Mouw
0 siblings, 0 replies; 8+ messages in thread
From: Erik Mouw @ 1999-12-31 23:54 UTC (permalink / raw)
To: mansoor; +Cc: gcc
On Fri, 24 Dec 1999 17:16:41 +0530 (IST), Mansoor Peerbhoy wrote:
> 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 ?
You should declare your function as:
int foo() __attribute__ ((cdecl));
Have a look at the gcc info files for more information (the section
about "Declaring Attributes of Functions").
Erik
--
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands
Phone: +31-15-2785859 Fax: +31-15-2781843 Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Problem with calling conventions.
1999-12-24 3:44 Mansoor Peerbhoy
1999-12-24 4:47 ` Erik Mouw
1999-12-30 1:19 ` Martin v. Loewis
@ 1999-12-31 23:54 ` Mansoor Peerbhoy
2 siblings, 0 replies; 8+ messages in thread
From: Mansoor Peerbhoy @ 1999-12-31 23:54 UTC (permalink / raw)
To: gcc
Hello, Unix Gurus,
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 ?
Any help will be appreciated.
Best regards,
Mansoor Peerbhoy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with calling conventions.
1999-12-24 3:44 Mansoor Peerbhoy
1999-12-24 4:47 ` Erik Mouw
@ 1999-12-30 1:19 ` Martin v. Loewis
1999-12-31 23:54 ` Martin v. Loewis
1999-12-31 23:54 ` Mansoor Peerbhoy
2 siblings, 1 reply; 8+ messages in thread
From: Martin v. Loewis @ 1999-12-30 1:19 UTC (permalink / raw)
To: mansoor; +Cc: gcc
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem with calling conventions.
1999-12-24 3:44 Mansoor Peerbhoy
@ 1999-12-24 4:47 ` Erik Mouw
1999-12-31 23:54 ` Erik Mouw
1999-12-30 1:19 ` Martin v. Loewis
1999-12-31 23:54 ` Mansoor Peerbhoy
2 siblings, 1 reply; 8+ messages in thread
From: Erik Mouw @ 1999-12-24 4:47 UTC (permalink / raw)
To: mansoor; +Cc: gcc
On Fri, 24 Dec 1999 17:16:41 +0530 (IST), Mansoor Peerbhoy wrote:
> 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 ?
You should declare your function as:
int foo() __attribute__ ((cdecl));
Have a look at the gcc info files for more information (the section
about "Declaring Attributes of Functions").
Erik
--
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands
Phone: +31-15-2785859 Fax: +31-15-2781843 Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Problem with calling conventions.
@ 1999-12-24 3:44 Mansoor Peerbhoy
1999-12-24 4:47 ` Erik Mouw
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Mansoor Peerbhoy @ 1999-12-24 3:44 UTC (permalink / raw)
To: gcc
Hello, Unix Gurus,
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 ?
Any help will be appreciated.
Best regards,
Mansoor Peerbhoy
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~1999-12-31 23:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-24 6:28 Problem with calling conventions Michael Meissner
1999-12-31 23:54 ` Michael Meissner
-- strict thread matches above, loose matches on Subject: below --
1999-12-24 3:44 Mansoor Peerbhoy
1999-12-24 4:47 ` Erik Mouw
1999-12-31 23:54 ` Erik Mouw
1999-12-30 1:19 ` Martin v. Loewis
1999-12-31 23:54 ` Martin v. Loewis
1999-12-31 23:54 ` Mansoor Peerbhoy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).