c++/6337: Fails to distinguish between operator[](int) and operator T*().
schalkc@ntaba.co.za
schalkc@ntaba.co.za
Wed Apr 17 08:54:00 GMT 2002
>Number: 6337
>Category: c++
>Synopsis: Fails to distinguish between operator[](int) and operator T*().
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 17 07:46:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: schalkc@ntaba.co.za
>Release: gcc version 3.1 20020205 (Red Hat Linux Rawhide 3.1-0.21)
>Organization:
>Environment:
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --host=i386-redhat-linux --with-system-zlib
>Description:
Try to compile the program, will fail with "because worst conversion for the former is better
than worst conversion for the latter" message.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="test-operator.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test-operator.cpp"
I2luY2x1ZGUgPGlvc3RyZWFtPgoKc3RydWN0IEEKewoJaW50IHhbMTBdOwoJb3BlcmF0b3IgaW50
KiAoKSB7cmV0dXJuIHg7fQoJaW50JiBvcGVyYXRvciBbXSAodW5zaWduZWQgaW50IGkpIHtyZXR1
cm4geFtpXTt9Cn07CgptYWluKCkKewoJQSBhOwoJKihzdGF0aWNfY2FzdDxpbnQqPihhKSkgPSA1
OwoJYVsxXT0gMTA7CgoJc3RkOjpjb3V0IDw8ICJbMF09PSIgPDwgYVswXSA8PCAiLCBbMV09PSIg
PDwgYVsxXSA8PCBzdGQ6OmVuZGw7CglyZXR1cm4gMDsKfQo=
More information about the Gcc-bugs
mailing list