This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54972] O2 breaks something in 4.6.3
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Oct 2012 11:31:59 +0000
- Subject: [Bug c++/54972] O2 breaks something in 4.6.3
- Auto-submitted: auto-generated
- References: <bug-54972-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54972
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-18 11:31:59 UTC ---
Apparently you didn't read http://gcc.gnu.org/bugs/
Before reporting that GCC compiles your code incorrectly,
compile it with gcc -Wall -Wextra and see whether this shows
anything wrong with your code. Similarly, if compiling with
-fno-strict-aliasing -fwrapv makes a difference, your code
probably is not correct.
And also the section on "Casting does not work as expected when optimization is
turned on" at http://gcc.gnu.org/bugs/#nonbugs
You should never report a bug without turning on warnings and seeing if the
compiler can tell you where the problem is.