Richard Henderson <[EMAIL PROTECTED]> writes:
> I've got no interest in reading a thread with 250 messages wherein
> language lawyers battle it out in a no-holds-barred grudge match.
> Would someone like to summarize, preferably with a test case that
> one side assumes to be miscompiled?
Case 1:
void f1 (int *addr) {
*((volatile int *) addr);
}
Case 2:
int c;
void f2 (int *addr) {
*(volatile int *) &c;
}
gcc 4.0 omits read accesses for both, earlier ones didn't.
Opinions on what the standard prescribes here are divided. Opinions on
what the Right Thing[tm] to do seems to mostly agree on not omitting
the access in either case; however, there have been concerns on
whether we can reliably implement that.
--
Falk