]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/29048 ("`x' is private" error duplicated when scope specified)
authorJason Merrill <jason@gcc.gnu.org>
Tue, 12 Feb 2008 19:25:28 +0000 (14:25 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 12 Feb 2008 19:25:28 +0000 (14:25 -0500)
        PR c++/29048
        * semantics.c (finish_qualified_id_expr): Avoid duplicate access
        check here, too.

From-SVN: r132265

gcc/testsuite/g++.dg/lookup/duperr1.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/lookup/duperr1.C b/gcc/testsuite/g++.dg/lookup/duperr1.C
new file mode 100644 (file)
index 0000000..cfb348d
--- /dev/null
@@ -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" }