This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix PR c++/13377, bad diagnostic for ambiguous name-lookup


On 29 Aug, Mark Mitchell wrote:
> Volker Reichelt wrote:
> 
>> 2005-08-29  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
>> 
>> 	PR c++/13377
>> 	* parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to
>> 	lookup_name_real on final parse.
> 
> OK.

Committed to mainline and the 4.0 branch.

With the patch for PR 23586 in place we now get a suitable
error message for the original testcase which I also added to
the testsuite as obvious.

===================================================================
--- gcc/gcc/testsuite/g++.dg/lookup/ambig5.C	2005-08-22 19:21:29 +0200
+++ gcc/gcc/testsuite/g++.dg/lookup/ambig5.C	2005-08-31 11:52:07 +0200
@@ -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" }
===================================================================

Regards,
Volker



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]