This is the mail archive of the gcc-bugs@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]

c++/1694: bogus errors during type deduction



>Number:         1694
>Category:       c++
>Synopsis:       bogus errors during type deduction
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 18 05:36:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Nathan
>Release:        unknown-1.0
>Organization:
>Environment:

>Description:
The attached file produces
current/flt1.C: In function `void Baz(int*, const int*)':
current/flt1.C:12: cannot convert `X<int, 0>' to `int' in initialization
current/flt1.C: In function `void Baz(float*, const float*)':
current/flt1.C:17: could not convert template argument `0' to `float'
current/flt1.C:18: could not convert template argument `0' to `const float'

float template parms are a gnu extension, but why the diagnostic
where they are . I expect line 18 to have no error

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="flt1.C"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="flt1.C"

Ly8gU3BlY2lhbCBnKysgb3B0aW9uczoKCi8vIGZsb2F0IHRlbXBsYXRlIHBhcm1zIGFyZSBhIEdD
QyBleHRlbnNpb24sIGJ1dCB0aGV5IHNlZW0gdG8gYmUgc3RyYW5nZQoKdGVtcGxhdGUgPGNsYXNz
IFQsIFQgZD4gY2xhc3MgWCB7fTsKCnRlbXBsYXRlIDxjbGFzcyBUPiBYPFQsMD4gRm9vIChUICop
Owp0ZW1wbGF0ZSA8Y2xhc3MgVD4gaW50IEZvbyAoVCBjb25zdCAqKTsKCnZvaWQgQmF6IChpbnQg
KnAxLCBpbnQgY29uc3QgKnAyKQp7CiAgaW50IGkgPSBGb28gKHAxKTsgLy8gRVJST1IgLSBjYW5u
b3QgY29udmVydAogIGludCBqID0gRm9vIChwMik7Cn0Kdm9pZCBCYXogKGZsb2F0ICpwMSwgZmxv
YXQgY29uc3QgKnAyKQp7CiAgaW50IGkgPSBGb28gKHAxKTsgLy8gRVJST1IgLSBjYW5ub3QgY29u
dmVydAogIGludCBqID0gRm9vIChwMik7Cn0K

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