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

2015-07-21 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20397 --- Comment #19 from Jonathan Wakely --- (In reply to Manuel López-Ibáñez from comment #18) > (In reply to Jonathan Wakely from comment #17) > > FWIW for the original testcase G++ now says: > > > > a.cc:9:8: error: ‘class A A::A’ is inaccessible

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

2015-07-21 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20397 --- Comment #18 from Manuel López-Ibáñez --- (In reply to Jonathan Wakely from comment #17) > 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; } >

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

2015-07-21 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20397 --- Comment #17 from Jonathan Wakely --- 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 { ^

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

2011-10-21 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20397 --- Comment #16 from Manuel López-Ibáñez 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

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

2010-03-05 Thread redi at gcc dot gnu dot org
--- Comment #15 from redi at gcc dot gnu dot org 2010-03-05 18:36 --- And the "recent changes" happened ~10 years ago. The language had already changed before that, but the example you referred to had not been updated. That was an accidental omission. -- http://gcc.gnu.org/bugzilla

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

2010-03-05 Thread redi at gcc dot gnu dot org
--- Comment #14 from redi at gcc dot gnu dot org 2010-03-05 18:34 --- (In reply to comment #13) > (in reply to comment #12) > > Yes I am referring to the standard. The 1998 standard has been superseded by the 2003 TC1, and that will soon be replaced too. "The standard" includes the re

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

2010-03-05 Thread s dot franke at bebbosoft dot de
--- Comment #13 from s dot franke at bebbosoft dot de 2010-03-05 17:52 --- (in reply to comment #12) Yes I am referring to the standard. C++ std 1998: class A { }; class B: private A { }; class C: public B { A* p;// ok: A accessible }; recent changes (som

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

2010-03-05 Thread redi at gcc dot gnu dot org
--- Comment #12 from redi at gcc dot gnu dot org 2010-03-05 11:01 --- Are you looking at the original 1998 standard? Please see http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#142 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20397

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

2010-03-04 Thread s dot franke at bebbosoft dot de
--- Comment #11 from s dot franke at bebbosoft dot de 2010-03-05 07:14 --- (in reply to comment #8) > As stated before, if you don't want the locally injected name, use > ::A instead. There is no injected name. Using a base class does not declare anything or inject a name. Making a ba

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

2010-03-04 Thread s dot franke at bebbosoft dot de
--- Comment #10 from s dot franke at bebbosoft dot de 2010-03-05 07:06 --- this is an example from the official C++ Standard which should be used as test case, "11.2 Accessibility of base classes and base class members": class B { public: int mi; // nonstatic member sta

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

2010-03-04 Thread manu at gcc dot gnu dot org
--- Comment #9 from manu at gcc dot gnu dot org 2010-03-04 18:29 --- 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 inf