This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29332] New: No error given for derived-to-private-base conversion in default arg.
- From: "widman at gimpel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Oct 2006 13:58:59 -0000
- Subject: [Bug c++/29332] New: No error given for derived-to-private-base conversion in default arg.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
For the following case:
// line 1
class A {};
class B : private A { };
extern B b;
void f( A & = b); // ERROR
A & a = b; // ERROR
... g++ issues only one error:
t.cpp:9: error: 'A' is an inaccessible base of 'B'
... but it should also complain about the default arg.
Incidentally, this example was boiled down from code in a real project.
--
Summary: No error given for derived-to-private-base conversion in
default arg.
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: widman at gimpel dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29332