Bill Allombert on Thu, 18 Dec 2003 14:14:59 +0100

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

Re: -fPIC joy, lexcmp woes.

On Sat, Dec 13, 2003 at 08:27:29PM +0100, Karim BELABAS wrote:
> On Wed, 10 Dec 2003, Ilya Zakharevich wrote:
> > On Wed, Dec 10, 2003 at 11:57:46PM +0100, Bill Allombert wrote:
> > > Well, now I am fixing gp2c to support the new 'i' prototype.
> >
> > What the hek?  Why do we need a new prototype type?  Why not just
> > change the return value to long (as it should have been from the
> > start)?  [If ABI is a question, rename the function as well.]
> It was the purpose of the 'install' mechanism to support as many "external"
> functions as possible (without changes to the external module). The basic
> return types which make sense to GP should be supported. [ Possibly, 'char',
> floats or unsigned types could be added, but nobody ever requested them... ]

I would like to mention the fact that we can only support *input* types
when sizeof(type)=sizeof(GEN) due to our functions calling model.

So we can handle function returning a int, but not function taking a int
as parameter:
int f(long x) is OK but
long f(int x) is not.

Of course a better functions calling system would do no harm especially
if it get rid of the current 8 arguments limit, but I don't see any
portable way to achieve this.