lkml.org 
[lkml]   [2009]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2/8] compiler-gcc.h: add more comments to RELOC_HIDE


On Thu, 15 Jan 2009, Rusty Russell wrote:

> On Tuesday 13 January 2009 04:03:49 Christoph Lameter wrote:
> > But that is not what is occurring. We do not do &var + LARGE_OFFSET.
> > Instead one does
> >
> > ((void *)&var) + LARGE_OFFSET
> >
> > or
> > ((unsigned long)&var) + LARGE_OFFSET
> >
> > The cast should cause the C compiler to drop all assumptions about size.
>
> No, and that's the point. Sorry, at this point you need to talk to a gcc expert. As I have said, I did and I believe what he told me.

Yeah, I personally believe in the "should cause the C compiler" part, but
gcc doesn't work that way. It will remember where the value came from,
even when the pointer has been cast to something else.

Linus


\
 
 \ /
  Last update: 2009-01-15 04:37    [W:0.672 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site