http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20397
--- Comment #16 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-10-21 07:57:59 UTC --- (In reply to comment #9) > I am reopening as an enhancement request because all this discussion could be > better summarized in the error message (in particular, the part about A being > injected in B and being private). > > clang has a "fixit/extra info" switch that provides a long explanation for > each > error message. I wonder what error/message they give here. Indeed, the error from clang is a bit more clear: /tmp/webcompile/_3843_0.cc:9:8: error: 'A' is a private member of 'A' int c(A *a) { return 7; } ^ /tmp/webcompile/_3843_0.cc:4:11: note: constrained by implicitly private inheritance here class B : A { ^ /tmp/webcompile/_3843_0.cc:1:7: note: member is declared here class A { ^ but I am not sure the first error is correctly enunciated.