Simon Hosie
Tue, 12 Dec 2000 10:46:56 -0800
> Pete French wrote: > > > -bat. [and has anybody got a better way of setting the top bit of an int in > > a vaguely protable manner ?! I spent 5 minutes getting that to work > > in gcc just now...] > > > On Tue, 12 Dec 2000, Gabriele Boccone wrote: > What about that: (-1)^(-1>>1) ? Hmm... for 2's compliment that's essentially INT_MIN. I think INT_MIN would be quite appropriate no matter what data format the chip used, so long as it used the same type for both pointers and integers. Oh, and it occurs to me that where I previously referred to INT_MAX, I should have used UINT_MAX (which amounts to ~0U in all situations I know of, so it's no different from the original solution). --------------------------------------------------------------------------- Send administrative requests to [EMAIL PROTECTED]