This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8424: initialising a pointer-to-member to an array element does not work
- From: bangerth at dealii dot org
- To: andyc at bluearc dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 1 Nov 2002 17:05:35 -0000
- Subject: Re: c++/8424: initialising a pointer-to-member to an array element does not work
- Reply-to: bangerth at dealii dot org, andyc at bluearc dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: initialising a pointer-to-member to an array element does not work
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Fri Nov 1 09:05:35 2002
State-Changed-Why:
This is not a bug. Your testcase boils down to
---------------------------
struct A {
int b[2];
};
int (A::*v) = &A::b[0]; // is this valid? If not, why not?
-------------------------------
The point is that A::b is not a member variable of type
"int (B::*)", and one of its elements is not a member
variable, but -- an element of a member variable. This is
not supposed to work.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8424