This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29332] No error given for derived-to-inaccessible-base conversion in default arg.
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Oct 2006 16:05:21 -0000
- Subject: [Bug c++/29332] No error given for derived-to-inaccessible-base conversion in default arg.
- References: <bug-29332-10061@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-10-03 16:05 -------
We just don't error until you use the function, in that the following errors:
// line 1
class A {};
class B : private A { };
extern B b;
int f( A & = b); // ERROR
A & a = b; // ERROR
int x = f(); // ERROR
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29332