gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] Re: (object (*)()) vs (long (*)())


From: Andreas Schwab
Subject: Re: [Gcl-devel] Re: (object (*)()) vs (long (*)())
Date: Fri, 02 Aug 2002 10:03:59 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.3.50 (ia64-suse-linux)

Camm Maguire <address@hidden> writes:

|> Greetings, and thanks for your *very helpful* reply!
|> 
|> OK, now it is clear to me what is going on.  I calling all functions
|> through a variable declared to return a pointer, and some functions
|> are returning a long.
|> 
|> I can fix the instances in the existing code fairly easily, but the
|> issue is that the lisp compiler produces C code using these
|> interchangeable declarations.  At some point, I need to either have
|> all compiled functions return the same union and use the existing
|> function link helper functions (in funlink.c, et.al.), or to duplicate
|> these functions to handle function variables returning long and modify
|> the compiler to use these in the correct instances instead.  As
|> always, the implementation is much easier than the conception of the
|> proper solution.  Comments most welcome.

The only proper solution is to make all functions use the same signature,
and cast the return value at the call site.  Otherwise you will get
problems on other architectures as well.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]