I am not sure why we need the U postfix in the first place. For literal
like ~0xFFF, the compiler should automatically sign-extends to our
expected size. Personally, I prefer to using ([u]intptr_t) ~0xFFF,
which is more portable. So we don't have to deal with U, UL, i64.
It is possible to use
On Thursday 03 January 2002 08:11 am, Chip Turner wrote:
The U was there for sign-correctness. Without it, gcc complains in a
number of places. I haven't tested it on 64-bit platforms, but on
32-bit intel, it is necessary.
uintptr_t sounds good to me, though; always using pointers seems
On Thu, 3 Jan 2002, Bryan C. Warnock wrote:
On Thursday 03 January 2002 12:33 am, Bryan C. Warnock wrote:
Looks like the chunk_base logic doesn't work on 64-bit Solaris. Every
test failure I checked was centered around an inaccesable address coming
out of STACK_CHUNK_BASE(*top) [line 85]
On Thu, Jan 03, 2002 at 08:46:31AM -0600, David M. Lloyd wrote:
On Thu, 3 Jan 2002, Bryan C. Warnock wrote:
On Thursday 03 January 2002 12:33 am, Bryan C. Warnock wrote:
Looks like the chunk_base logic doesn't work on 64-bit Solaris. Every
test failure I checked was centered around an
On Thu, 3 Jan 2002, Nicholas Clark wrote:
On Thu, Jan 03, 2002 at 08:46:31AM -0600, David M. Lloyd wrote:
Maybe we should be using the Configure output to determine what postfix to
use, based on the size of ints, longs, long longs, etc., and pointers,
rather than almost always being
On Thu, 3 Jan 2002, Nicholas Clark wrote:
On Thu, Jan 03, 2002 at 08:46:31AM -0600, David M. Lloyd wrote:
Maybe we should be using the Configure output to determine what postfix to
use, based on the size of ints, longs, long longs, etc., and pointers,
rather than almost always being
Also, the UL[L] should probably be on the inside of the ():
stacklow = '(~0xfffULL)',
I still don't see this one is safer than my proposal.
~((uintptr_t) 0xfff);
Anyway, we should use some kind of macro for this purpose.
#ifndef foo
#define foo(a) ((uintptr_t) (a))
#endif
or
Also, the UL[L] should probably be on the inside of the ():
stacklow = '(~0xfffULL)',
I still don't see this one is safer than my proposal.
~((uintptr_t) 0xfff);
Well, if you ever want to specify a constant longer than 0x7fff, you'd
better put a 'u', 'ul' or 'ull' after