This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/20397] improve diagnostic for 'is inaccessible' error


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20397

--- Comment #17 from Jonathan Wakely <redi at gcc dot gnu.org> ---
FWIW for the original testcase G++ now says:

a.cc:9:8: error: âclass A A::Aâ is inaccessible within this context
  int c(A *a) { return 7; }
        ^
a.cc:1:9: note: declared here
 class A {
         ^

Which is ... different, I'll say that for it.

I'm not sure if "A::A" is meant to refer to the injected-class-name, but if it
is then it's not terribly clear unless you already know what that means and why
it happens.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]