This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18289] GCC3.4.2 selects incorrect function overload when an ellipsis overload is available
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Nov 2004 21:03:13 -0000
- Subject: [Bug c++/18289] GCC3.4.2 selects incorrect function overload when an ellipsis overload is available
- References: <20041103202904.18289.aleethorp@hotmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-11-03 21:03 -------
This is not a bug.
[13.3.3.2]/2 says that a standard conversion sequence is better
than an ellipsis conversion sequence.
The note in [13.3]/1 says:
The function selected by overload resolution is not guaranteed to
be appropriate for the context. Other restrictions, such as the
accessibility of the function, can make its use in the calling
context ill-formed.
Converting a pointer to a pointer of a base class is a standard
conversion. So gcc is right in choosing f(A*) and complaining
about it later.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18289