From: Jason Merrill Date: Tue, 12 Feb 2008 19:25:28 +0000 (-0500) Subject: re PR c++/29048 ("`x' is private" error duplicated when scope specified) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d9e38079c21ef9cd91cd9982fb1e00fa91546c2e;p=gcc.git re PR c++/29048 ("`x' is private" error duplicated when scope specified) PR c++/29048 * semantics.c (finish_qualified_id_expr): Avoid duplicate access check here, too. From-SVN: r132265 --- diff --git a/gcc/testsuite/g++.dg/lookup/duperr1.C b/gcc/testsuite/g++.dg/lookup/duperr1.C new file mode 100644 index 00000000000..cfb348d49cd --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/duperr1.C @@ -0,0 +1,5 @@ +// PR c++/29048 + +class A { int i; }; // { dg-bogus "is private.*is private" } +// { dg-error "is private" "" { target *-*-* } 3 } +class B:public A { B() { A::i=0; } }; // { dg-error "within this context" }