Skip to main content
2 events
when toggle format what by license comment
Jan 29, 2016 at 23:54 comment added supercat I fully recognize that it would make sense to have a rule that specifying that if a variable is accessed by a pointer that is not volatile-qualified the access may be reordered with regard to accesses of other volatile variables, and I recognize that in many cases such reordering could cause problems that would end up invoking UB, but if program behavior would be well-defined if a global variable were not declared variable, is there any reason why making the variable volatile should cause the program to invoke UB if nothing actually required that it be volatile?
Nov 24, 2015 at 13:10 history answered MSalters CC BY-SA 3.0