This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/34841] 'make check' of libsndfile-1.0.17 fails with gcc-4.2.2 -O2 optimization, OK with -O1 one
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2008 06:55:58 -0000
- Subject: [Bug c/34841] 'make check' of libsndfile-1.0.17 fails with gcc-4.2.2 -O2 optimization, OK with -O1 one
- References: <bug-34841-13529@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #24 from manu at gcc dot gnu dot org 2008-01-21 06:55 -------
(In reply to comment #23)
> It's too bad the bug is closed just as a duplicate of another bug.
I am sorry that you feel disappointed. I believed that the rationale behind
closing this was fairly clear. I tried to answer your concerns without getting
into a debate.
Point 1), 2) and 3) are about the meaning of undefined behaviour and this have
been lengthy discussed in the mailing list.
Probably the latest discussion here:
http://gcc.gnu.org/ml/gcc/2007-01/msg00881.html
More to be found in the archives:
http://gcc.gnu.org/ml/gcc/
About points 4) and 5), gcc-3.4.6 and gcc-4.1.2 are only consistent in the
examples you have tried but, as discussed in comment 14, optimization changes
code and different code has different behaviour. We strive to give consistent
results for defined behavior. And we strive to give the best optimized code
without breaking the standards. Again, this has been discussed thoroughly in
the mailing list in the context of signed overflow and also strict aliasing
(Wstrict-aliasing).
It is unlikely that whatever point you made hasn't been covered in a discussion
already, this is why gcc developers generally avoid any discussion about
undefined behaviour. This is nothing new.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2008-01-19 00:22:14 |2008-01-21 06:55:57
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34841