This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50115] Integer test optimised away at -O2 by the VRP
- From: "balint at szentedwg dot ro" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Aug 2011 11:59:59 +0000
- Subject: [Bug c++/50115] Integer test optimised away at -O2 by the VRP
- Auto-submitted: auto-generated
- References: <bug-50115-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50115
--- Comment #7 from Balint Szente <balint at szentedwg dot ro> 2011-08-18 11:59:59 UTC ---
Thanks for your prompt reply. I understand that my test case is undefined
behavior from the C/C++ standard's perspective.
I disregarded that it is not allowed to make any overflows. Unfortunately C/C++
does not provide anything to detect these situations AFAIK.