http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46220
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-03 20:52:00 UTC --- (In reply to comment #4) > Jason, is there a reason to disallow covariant returns where the return type > only differs in cv-qualification of the class type? > > Could the requirement for a complete type be incorporated into the second > bullet of p5, since it has to be complete for us to know it's an accessible > base? Seems reasonable to me. Or change "if the return type..." to "if the class in the return type...". I note that EDG accepts the testcase. > Why does the third bullet of p5 talk about the cv-qualification of pointers > and > references, when top-level cv-quals in return types are ignored, and > references > have no cv-quals? Is this an artefact of ARM-era C++? Top-level cv-quals are not ignored in return types, only in parameter types. > Am I misreading the wording, or should I ask Mike to open an issue? I think an issue to clarify this would be appropriate. I'll go ahead and fix the compiler.