c++/8424: initialising a pointer-to-member to an array element does not work

andyc@bluearc.com andyc@bluearc.com
Fri Nov 1 07:36:00 GMT 2002


>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



More information about the Gcc-bugs mailing list