Summary: | gcc should warn about undefined behaviour | ||
---|---|---|---|
Product: | gcc | Reporter: | Pawel Sikora <pawel_sikora> |
Component: | c | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | enhancement | CC: | gcc-bugs |
Priority: | P2 | Keywords: | diagnostic |
Version: | 4.0.0 | ||
Target Milestone: | --- | ||
Host: | i686-pld-linux | Target: | i686-pld-linux |
Build: | i686-pld-linux | Known to work: | |
Known to fail: | Last reconfirmed: | 2005-03-18 13:44:52 |
Description
Pawel Sikora
2005-03-18 10:46:12 UTC
Confirmed. I see no undefined behavior here. The order is unspecified, not undefined, and there is nothing more wrong with accessing two volatile objects between sequence points than there would be in (s.x = 1) + (s.y = 2) modifying both objects (volatile or not) without an intervening sequence point. |