[PR c++/17805] limit operator overload candidates for enum operands

Alexandre Oliva aoliva@redhat.com
Wed Mar 2 02:24:00 GMT 2005

On Feb 10, 2005, Alexandre Oliva <aoliva@redhat.com> wrote:

> We're a bit too lenient in creating the candidate list for overload
> resolution for expressions that use user-defined operator functions.
> This patch arranges for us to reject functions that don't get an exact
> match for at least one of the enum-typed arguments, if none of the
> arguments have class types.

> Regression-tested on x86_64-linux-gnu.  Ok to install?

> Index: gcc/cp/ChangeLog
> from  Alexandre Oliva  <aoliva@redhat.com>

> 	PR c++/17805
> 	* call.c (build_new_op): Filter out operator functions that don't
> 	satisfy enum-conversion match requirements.



Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

More information about the Gcc-patches mailing list