Bug 15468

Summary: Can not take address of protected method in base class.
Product: gcc Reporter: Murray Cumming <murrayc>
Component: c++Assignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED DUPLICATE    
Severity: normal CC: bryan, gcc-bugs
Priority: P2    
Version: 3.4.0   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:
Attachments: gcc34test.ii (preprocessed .cc file)

Description Murray Cumming 2004-05-15 18:19:13 UTC
gcc version: gcc 3.4.0 tarball.
system type: Red Hat Linux 9, x86.
options given when building gcc: None.
command line to trigger bug: g++ test.cc

compiler output:
gcc34test.cc: In constructor `B::B()':
gcc34test.cc:25: error: `virtual void A::do_something()' is protected
gcc34test.cc:32: error: within this context

the preprocessed file (*.i*) that triggers the bug: Attached.
Comment 1 Murray Cumming 2004-05-15 18:19:49 UTC
Created attachment 6308 [details]
gcc34test.ii (preprocessed .cc file)

test case
Comment 2 Andrew Pinski 2004-05-15 18:25:33 UTC
This is not a bug in 3.4.0  but a bug in previous versions of gcc and GCC should have rejected this.  
This is a dup of bug 11174.

*** This bug has been marked as a duplicate of 11174 ***

*** This bug has been marked as a duplicate of 11174 ***