lkml.org 
[lkml]   [2002]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] C undefined behavior fix
On Wed, Jan 02, 2002 at 03:05:48PM -0700, Tom Rini wrote:
>
> Well, the problem is that we aren't running where the compiler thinks we
> are yet. So what would the right fix be for this?

Obviously -ffreestanding isn't, because this problem could crop up pretty
much anywhere. The involvement of standard library functions is almost
coincidence and so -ffreestanding would only fix the current symptom.

I'm not much of a kernel hacker, but a quick (and not very efficient,
granted) fix could be to make the offset an extern variable, yes? That
would force the compiler to fall back on the basic "your gun, your foot,
your choice" memory model.


Jeroen

-
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:15    [W:0.113 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site