From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26519 invoked by alias); 19 Mar 2003 08:56:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 26497 invoked by uid 71); 19 Mar 2003 08:56:00 -0000 Resent-Date: 19 Mar 2003 08:56:00 -0000 Resent-Message-ID: <20030319085600.26496.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, rguenth@tat.physik.uni-tuebingen.de Received: (qmail 10971 invoked by uid 48); 19 Mar 2003 08:53:09 -0000 Message-Id: <20030319085309.10970.qmail@sources.redhat.com> Date: Wed, 19 Mar 2003 08:56:00 -0000 From: rguenth@tat.physik.uni-tuebingen.de Reply-To: rguenth@tat.physik.uni-tuebingen.de To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/10146: [3.4 regression] [new parser] template function lookup failure(s) X-SW-Source: 2003-03/txt/msg01255.txt.bz2 List-Id: >Number: 10146 >Category: c++ >Synopsis: [3.4 regression] [new parser] template function lookup failure(s) >Confidential: no >Severity: critical >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Wed Mar 19 08:56:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Richard Guenther >Release: g++-3.4 (GCC) 3.4 20030313 (experimental) >Organization: >Environment: >Description: In the following testcase the marked lines fail/work even if they should/should not (the former being the problem for me). One should carefuly check the standard if any of the working one should be rejected. The error message from compiling the testcase is bellatrix:~/src/tests$ g++-3.4 -c temp.cpp temp.cpp: In member function `void Bar::operator()(const U&) [with U = int, T = char]': temp.cpp:32: instantiated from here temp.cpp:14: error: no matching function for call to `Foo::foo(const int&) ' temp.cpp:15: error: no matching function for call to `Foo::foo(const int&) ' temp.cpp:16: error: no matching function for call to `Foo::foo(const int&) ' temp.cpp:32: instantiated from here temp.cpp:18: error: no matching function for call to `Foo::bar(const int&) ' temp.cpp:19: error: no matching function for call to `Foo::bar(const int&) ' Testcase: template struct Foo { template static void foo(const U&); template void bar(const U&); }; template struct Bar { template void operator()(const U&u) { Foo().foo(u); // does not work (ok) Foo::foo(u); // does not work (ok) Foo().template foo(u); // does not work Foo::template foo(u); // does work Foo().bar(u); // does not work (ok) Foo().template bar(u); // does not work Foo().foo(u); // does work ?? Foo::foo(u); // does work ?? Foo().template foo(u); // does work Foo::template foo(u); // does work Foo().bar(u); // does work ?? Foo().template bar(u); // does work } }; void foo() { int i; Bar()(i); } >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: