From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28030 invoked by alias); 5 Aug 2003 18:21:53 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 28013 invoked by uid 48); 5 Aug 2003 18:21:53 -0000 Date: Tue, 05 Aug 2003 18:21:00 -0000 Message-ID: <20030805182153.28012.qmail@sources.redhat.com> From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030805155639.11808.nicolas.burrus@lrde.epita.fr> References: <20030805155639.11808.nicolas.burrus@lrde.epita.fr> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/11808] [3.4 regression] Wrong namespace lookup for template function when induced by a template parameter X-Bugzilla-Reason: CC X-SW-Source: 2003-08/txt/msg00706.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11808 bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rejects-valid | Summary|[3.4 Regression] Wrong |[3.4 regression] Wrong |namespace lookup for |namespace lookup for |template function when |template function when |induced by a template |induced by a template |parameter |parameter ------- Additional Comments From bangerth at dealii dot org 2003-08-05 18:21 ------- Confirmed. Here's a cleaned-up example: -------------------------- namespace NS_1 { struct A {}; struct foo {}; } namespace NS_2 { template void foo(T); template void bar() { NS_1::A a; NS_2::foo(a); } template void bar(); } --------------------------- g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc x.cc: In function `void NS_2::bar() [with T = int]': x.cc:15: instantiated from here x.cc:3: error: `struct NS_1::foo' is not a function, x.cc:7: error: conflict with `template void NS_2::foo(T)' x.cc:12: error: in call to `foo' gcc seems to think it needs to do Koenig lookup, but this is unnecessary here since the call to foo is namespace-qualified. W.