c++/974: bug with nested class/ friend interaction

robt@flyingpig.com robt@flyingpig.com
Mon Dec 4 04:36:00 GMT 2000


>Number:         974
>Category:       c++
>Synopsis:       bug with nested class/ friend interaction
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 04 04:36:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Rob Taylor
>Release:        2.97 20001122 (experimental)
>Organization:
>Environment:
Reading specs from /usr/local/bin/../lib/gcc-lib/i386-pc-linux-gnu/2.97/specs
Configured with: ../configure --prefix=/tmp/gcc-20001122-root/usr/local --enable-shared --enable-threads --disable-checking i386-pc-linux-gnu
>Description:
gcc test0.cpp
gives 
test0.cpp:8: no type named 'Inner2' in 'class Outer'

removal of line 3 ('friend void f1();') or moving to after 
Inner2's declaration allows a successful compilation
>How-To-Repeat:
gcc test0.cpp
>Fix:
removal of line 3 ('friend void f1();') or moving to after 
Inner2's declaration allows a successful compilation

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-unknown-content-type-TextPad.cpp; name="test0.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test0.cpp"

Y2xhc3MgT3V0ZXIKewogIGZyaWVuZCB2b2lkIGYxKCk7CiAgY2xhc3MgSW5uZXIyOwp9OwoKY2xh
c3MgT3V0ZXI6OklubmVyMgp7Cn07Cg==


More information about the Gcc-bugs mailing list