lkml.org 
[lkml]   [2002]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: type safe lists (was Re: PATCH: type safe(r) list_entry repacement: generic_out_cast)
Linus Torvalds wrote:
> >> As long as your pointers are 32bit this seems to be ok. But on
> >> 64bit implementations pointers are not (unsigned long) so this cast
> >> seems to be wrong.
> >
> >A pointer fits into unsigned long on all 64bit linux ports.
> >The kernel very heavily relies on that.
>
> Not just the kernel, afaik. I think it's rather tightly integrated into
> gcc internals too (ie pointers are eventually just converted to SI
> inside the compiler, and making a non-SI pointer would be hard).

That can't be the case, as how would GCC represent 64-bit pointers on
platforms like the Alpha, which support 64-bit, 32-bit, 16-bit and 8-bit
types? 64-bits must be DImode simply because QImode is the smallest
mode, and required for the 8-bit type.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.065 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site