summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup
diff options
context:
space:
mode:
authorreichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-31 10:32:54 +0000
committerreichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-31 10:32:54 +0000
commit0e8ce9be8a1b11ba29830fd021feca4947e16a58 (patch)
treed164db8a50a33031569262b519135bb099a64c6a /gcc/testsuite/g++.dg/lookup
parentfb2c31e59fa739b2a116dd861c3f3675d15ea232 (diff)
downloadgcc-0e8ce9be8a1b11ba29830fd021feca4947e16a58.tar.gz
PR c++/13377
* parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to lookup_name_real on final parse. * g++.dg/lookup/ambig4.C: New test. * g++.dg/lookup/ambig5.C: New test. * g++.dg/tc1/dr101.C: Adjust error markers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103667 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/lookup')
-rw-r--r--gcc/testsuite/g++.dg/lookup/ambig4.C14
-rw-r--r--gcc/testsuite/g++.dg/lookup/ambig5.C13
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lookup/ambig4.C b/gcc/testsuite/g++.dg/lookup/ambig4.C
new file mode 100644
index 00000000000..ab1a14518d5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/ambig4.C
@@ -0,0 +1,14 @@
+// PR c++/13377
+// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+// { dg-do compile }
+
+namespace N
+{
+ int i; // { dg-error "declared" }
+}
+
+int i; // { dg-error "declared" }
+
+using namespace N;
+
+void foo() { i; } // { dg-error "in this scope|ambiguous" }
diff --git a/gcc/testsuite/g++.dg/lookup/ambig5.C b/gcc/testsuite/g++.dg/lookup/ambig5.C
new file mode 100644
index 00000000000..8f74efc7518
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/ambig5.C
@@ -0,0 +1,13 @@
+// PR c++/13377
+// Origin: Boris Kolpackov <boris@kolpackov.net>
+// { dg-do compile }
+
+namespace N
+{
+ namespace M {} // { dg-error "declared" }
+}
+
+namespace M {} // { dg-error "declared" }
+
+using namespace N;
+using namespace M; // { dg-error "namespace-name|ambiguous" }