On 21/09/11 08:03, David Brown wrote:
Asking to read it by a volatile read does not
change the nature of "foo" - the compiler can still implement it as a
compile-time constant.

But since I am accessing the data through the pointer and the pointer qualifies the data as volatile, shouldn't the compiler avoid this kind of optimization for reads through the pointer?

It still is a regression from GCC45, however it might be considered a feature instead of a bug as I already mentioned to Ian.

--
PMatos

Reply via email to