Re: [SLUG] GCC -- anomaly or feature?

From: R.G. Mayhue (r.g.mayhue@verizon.net)
Date: Wed Aug 15 2001 - 22:09:14 EDT


On Wednesday 15 August 2001 10:02 pm, Jason Copenhaver wrote:
>
> I imagine this has to do with the way C passes function
> parameters.. It puts them on the stack from right to left.. This
> makes it easy to do things like variable parameter functions.. I
> thought there was a way to force C/gcc to use Pascal like function
> calls.. just can't seem to find anything about it at the moment..
>
> Jason
>

I believe you are correct Jason. I think you should just be able to
use the "pascal" modifier on the function call.

>
> On Wed, 15 Aug 2001, Ed Centanni wrote:
> > I found out today that when you call a function with functions as
> > arguments:
> >
> > DoThisThing(with1(thing), with2(thing), with3(thing));
> >

So Ed's function would be rewritten as:

pascal DoThisThing(with1(thing), with2(thing), with3(thing));

If there is a return type it would precede the "pascal" modifier.

It should work with gcc but I have never tried it.

-- 
R.G. Mayhue
r.g.mayhue@verizon.net



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:29:43 EDT