This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/38486] Missing warning about type punning
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Dec 2008 18:05:45 -0000
- Subject: [Bug middle-end/38486] Missing warning about type punning
- References: <bug-38486-4938@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from rguenth at gcc dot gnu dot org 2008-12-29 18:05 -------
Even if I cannot find the proper section of the standard that says &a->b is
not considered an access it does make sense for GIMPLE to do so. Otherwise
we cannot transform (char *)a + 4 to &a->b because the latter would be a
(possibly invalid) access while the former is not.
So, we definitely should _not_ generate a V_C_E here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38486