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]
Other format: [Raw text]

[Bug c++/18289] GCC3.4.2 selects incorrect function overload when an ellipsis overload is available


------- 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


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