From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17765 invoked by alias); 15 Jul 2002 21:26:01 -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 17718 invoked by uid 71); 15 Jul 2002 21:26:00 -0000 Resent-Date: 15 Jul 2002 21:26:00 -0000 Resent-Message-ID: <20020715212600.17717.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, nathan@codesourcery.com Received: (qmail 14586 invoked by uid 61); 15 Jul 2002 21:18:25 -0000 Message-Id: <20020715211825.14585.qmail@sources.redhat.com> Date: Mon, 15 Jul 2002 14:26:00 -0000 From: nathan@codesourcery.com Reply-To: nathan@codesourcery.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/7319: misleading template in error message X-SW-Source: 2002-07/txt/msg00471.txt.bz2 List-Id: >Number: 7319 >Category: c++ >Synopsis: misleading template in error message >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon Jul 15 14:26:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: nathan@codesourcery.com >Release: unknown-1.0 >Organization: >Environment: >Description: The attached program fails to compile with, nathan@uha:21>g++ -c foo.cc foo.cc: In function `void Foo(const A&)': foo.cc:11: call of overloaded `Foo(int)' is ambiguous foo.cc:7: candidates are: void A::Foo(T) const [with T = int] foo.cc:4: void A::Foo(T, int = 0) [with T = int] note that function on line 7 is shown with a const qualified this pointer - the specialization has no const qualifier (and that is the cause of the problem). I'm sure there are other cases of specializations changing non-templated parms. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="foo.cc" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="foo.cc" c3RydWN0IEEKewogIHRlbXBsYXRlIDx0eXBlbmFtZSBUPiB2b2lkIEZvbyAoVCkgY29uc3Q7CiAg dGVtcGxhdGUgPHR5cGVuYW1lIFQ+IHZvaWQgRm9vIChULCBpbnQgPSAwKTsKfTsKCnRlbXBsYXRl IDw+IHZvaWQgQTo6Rm9vIChpbnQpOwoKdm9pZCBGb28gKEEgY29uc3QgJnB0cikKewogIHB0ci5G b28gKDApOwp9Cgo=