This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15942] modifying data in a int * cast pointer to a pointer to a member has no effect when -O2 is used
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jun 2004 16:24:44 -0000
- Subject: [Bug c++/15942] modifying data in a int * cast pointer to a pointer to a member has no effect when -O2 is used
- References: <20040611161330.15942.indrek@mare.ee>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-06-11 16:24 -------
This code is invalid. If you do
int a:: *n[8];
you allocate an array of 8 pointers-to-int-member. However, struct a
does not have an integer member, only an array of integers. You are
not allowed to convert between these.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15942