lkml.org 
[lkml]   [2002]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] C undefined behavior fix
Date
<<So, I would claim that the case is symetric with writing volatiles.
If the standard doesn't make a distinction for write v read, then you
can't and claim that distinction is based in the standard. If you
claim the standard does make a distinction, please point it out, I am
unaware of it.
>>

Well obviously you do not go writing to other variables, but if you have
three variables IN ONE PROGRAM

a
b
c

adjacently allocated, and b is volatile, and a/c are not, then your
argument *so far* would appear to allow a compiler to do an "over-wide"
load for b. If you think otherwise, please prove from standard.

Of course a write is generally not at all symmetrical, since you don't
want a write to be to clobber a and c (yes yes, I know you could still
construct a far out case in which a and b might be stored together, and
indeed that is a legitimate separate discussion).
-
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.223 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site