public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/7319: misleading template in error message
@ 2002-07-15 14:26 nathan
  0 siblings, 0 replies; only message in thread
From: nathan @ 2002-07-15 14:26 UTC (permalink / raw)
  To: gcc-gnats


>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] <near match>
foo.cc:4:                 void A::Foo(T, int = 0) [with T = int] <near match>

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=


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-07-15 21:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-15 14:26 c++/7319: misleading template in error message nathan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).