public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/8424: initialising a pointer-to-member to an array element does not work
@ 2002-11-01  9:05 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2002-11-01  9:05 UTC (permalink / raw)
  To: andyc, gcc-bugs, gcc-prs, nobody

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c++/8424: initialising a pointer-to-member to an array element does not work
@ 2002-11-01  7:36 andyc
  0 siblings, 0 replies; 2+ messages in thread
From: andyc @ 2002-11-01  7:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8424
>Category:       c++
>Synopsis:       initialising a pointer-to-member to an array element does not work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 01 07:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     andyc@bluearc.com
>Release:        gcc version 3.2.1 20021020 (Debian prerelease)
>Organization:
>Environment:
Debian Linux unstable release
>Description:
The attached program gives the following errors:

# g++-3.2 -c -o membervar.o membervar.cpp
membervar.cpp:6: member `B::b' is non-static but referenced as a static member
membervar.cpp:15: at this point in file
membervar.cpp:6: member `B::b' is non-static but referenced as a static member
membervar.cpp:15: at this point in file
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="membervar.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="membervar.cpp"

c3RydWN0IEEgewp9OwoKc3RydWN0IEIgewogICAgQSAgIGE7CiAgICBBICAgYlsyXTsKfTsKCnN0
cnVjdCBDIHsKICAgIEEgICAoQjo6KnYpOwp9OwoKQyBjW10gPSB7CiAgICAmQjo6YSwKICAgICZC
OjpiWzBdICAgIC8vIGlzIHRoaXMgdmFsaWQ/IElmIG5vdCwgd2h5IG5vdD8KfTsK


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-01 17:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-01  9:05 c++/8424: initialising a pointer-to-member to an array element does not work bangerth
  -- strict thread matches above, loose matches on Subject: below --
2002-11-01  7:36 andyc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).