[lkml]   [2004]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH][2.6.6-rc3] gcc-3.4.0 fixes
William Lee Irwin III writes:
> On Tue, Jun 01, 2004 at 04:52:59PM +0200, Mikael Pettersson wrote:
> > You're assuming pointers have uniform representation.
> > C makes no such guarantees, and machines _have_ had
> > different types of representations in the past.
> > Some not-so-obsolete 64-bit machines in effect use fat
> > representations for pointers to functions (descriptors),
> > but they usually cheat and use pointers to the descriptors
> > instead. However, a C implementation could legally
> > represent a function pointer as a 128-bit value, while
> > data pointers remain 64 bits.
> IIRC for all types foo, sizeof(foo *) <= sizeof(void *), no?
> If so, 128-bit function pointers implies >= 128-bit void pointers.

No, sizeof(foo*) <= sizeof(void*) only holds for data pointers.
The C standard is very explicit about not guaranteeing any
relationship between function pointers and void*. However,
a function pointer can be converted to a pointer to a different
function type and back again, without loss of information.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:03    [W:0.071 / U:1.400 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site