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