This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]