[Bug c++/9807] [3.3 regression] Derived class object used as default parameter for base class reference requires explicit cast to reference to base class

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Nov 3 20:07:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9807


reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |


------- Additional Comments From reichelt at gcc dot gnu dot org  2003-11-03 20:07 -------
The diagnostic got magically fixed on the branch (before 3.3.2).

It now reads:

lall.cc:7: error: invalid type `B' for default argument to `A&'
lall.cc:9: error: invalid initialization of non-const reference of type 'A&' 
   from a temporary of type 'B'
lall.cc:7: error: in passing argument 1 of `C::C(A&)'

So I'm reopening the PR ...



More information about the Gcc-bugs mailing list