This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/42907] -fstrict-aliasing breaks valid code
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2010 22:51:14 -0000
- Subject: [Bug c/42907] -fstrict-aliasing breaks valid code
- References: <bug-42907-18727@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #23 from pinskia at gcc dot gnu dot org 2010-01-30 22:51 -------
GCC and aliasing is one area which talked about a lot. The problem is what the
standard allows to do and what people think the compiler should do (not based
on anything except what they are taught) are two different things. I don't
remember any time during my schooling where my teacher even mentioned aliasing
rules; though I knew they existed. So maybe my point is that aliasing is not
taught well in any C/C++ classes and we should look into ways of fixing that
issue rather than saying GCC should change. Yes warnings can help in teaching
but not always.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42907