This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/20531] New: gcc should warn about undefined behaviour
- From: "pluto at pld-linux dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Mar 2005 10:46:15 -0000
- Subject: [Bug other/20531] New: gcc should warn about undefined behaviour
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
volatile struct {
int x, y;
} s;
int foo()
{
return (s.x > s.y); // undefined behavior:
// the order of volatile accesses
// is undefined in this statment
}
--
Summary: gcc should warn about undefined behaviour
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at pld-linux dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pld-linux
GCC host triplet: i686-pld-linux
GCC target triplet: i686-pld-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20531