This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/30475] assert(int+100 > int) optimized away
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2007 18:16:42 -0000
- Subject: [Bug c/30475] assert(int+100 > int) optimized away
- References: <bug-30475-3511@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #37 from pluto at agmk dot net 2007-01-21 18:16 -------
(In reply to comment #36)
> Now, to summarize.
you're leading to undefined behaviour - do you understand this simple fact?
in such cases compiler can do *anything* with your code.
> current behavior is bad for a lot of people.
it's the highest time to read the standard
and use unsigned types or -fwrapv.
> I'll just auto-reopen the bug and say "see previous arguments".
you're violating standard, so stop screaming.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30475