Eric Eide wrote:
Yang> It's undefined because a non-volatile pointer "p" points to a Yang> volatile object "i". Yes. (Well, more strictly, it is undefined because `i' is accessed through `p', not simply because `p' points to `i'.) But I said this in my message. I think you might have answered without reading the bottom half of my email? Eric.
Sorry.There were discussions long time ago when Xuejun was implementing volatile point thing. I am sure Csmith tries to conform with the C standard in terms of volatile pointer stuff. If it generates code like:
volatile int g; int *p = &g;then it's a Csmith bug. As far as I know, Csmith analysis rules out this kind of code.
- Yang