[Bug c++/17314] Error message wrongly shows declared rather than inherited access
paolo.carlini at oracle dot com
gcc-bugzilla@gcc.gnu.org
Thu May 16 12:49:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17314
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|gcc-bugs at gcc dot gnu.org |
--- Comment #13 from Paolo Carlini <paolo.carlini at oracle dot com> ---
I may be missing details, but I'm not sure we have a serious problem here. Note
that:
class A {
public:
A(){}
};
class B : virtual A {
};
class C : public B {};
int main () {
C c;
}
is fine. Thus, to be clear, isn't that the "declared access" doesn't matter.
The real issue seems that the complete rules of protected access are complex
and hard to, so to speak, summarize in the error message. Gaby?
More information about the Gcc-bugs
mailing list