bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug-gnulib] Re: comparison_fn_t


From: Paul Eggert
Subject: Re: [bug-gnulib] Re: comparison_fn_t
Date: Sun, 29 May 2005 00:44:01 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

address@hidden (Larry Jones) writes:

> Paul Eggert writes:
>> 
>> I should warn you that the C Standard does not allow that sort of
>> cast.  This is for portability to hosts that use different
>> representations for different kinds of pointers; such hosts can use
>> different calling conventions for char * and void *, so casting the
>> function pointer will result in code that doesn't work.  Admittedly
>> such hosts are rare (typically they're word-oriented machines) but
>> all other things being equal we might as well port to them.
>
> As far as I know, such hosts are non-existent.  While what you say is
> quite correct for other pointer types,

Yes, quite true.  I should have said "struct mumble *" or "char **"
rather than "char *".  (Which is the common case anyway, for qsort
anyway.)  Sorry about the confusion.




reply via email to

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