------- Comment #2 from widman at gimpel dot com 2006-10-03 16:38 -------
Ok, here's something that's a little closer to the original example:
class A;
class B;
extern B b;
struct C {
static int f( A& = b); // ERROR
};
class A{};
class B : public A {};
int n = C::f();
Failing to report this error doesn't appear to lead to a "real" bug, but it's
still ill-formed, so when you try to port your code to a compiler with the EDG
front end, you'll get:
error: a reference of type "A &" (not const-qualified) cannot
be initialized with a value of type "B"
static int f( A& = b); // ERROR
^
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29332