aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2008-02-12 14:25:28 -0500
committerJason Merrill <jason@gcc.gnu.org>2008-02-12 14:25:28 -0500
commitd9e38079c21ef9cd91cd9982fb1e00fa91546c2e (patch)
tree0346096a278c46ff009fa30f64f938657f27abb4
parente4521d118a44d6e3b07612ac3fa9fe93eea17403 (diff)
downloadgcc-d9e38079c21ef9cd91cd9982fb1e00fa91546c2e.zip
gcc-d9e38079c21ef9cd91cd9982fb1e00fa91546c2e.tar.gz
gcc-d9e38079c21ef9cd91cd9982fb1e00fa91546c2e.tar.bz2
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
-rw-r--r--gcc/testsuite/g++.dg/lookup/duperr1.C5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lookup/duperr1.C b/gcc/testsuite/g++.dg/lookup/duperr1.C
new file mode 100644
index 0000000..cfb348d
--- /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" }