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

Re: [C++ PATCH] [PR3671] Disallow conversion between enumerationtypes in template deduction


On Mon, 5 Jul 2004 20:56:01 +0200, "Giovanni Bajo" <giovannibajo@libero.it> wrote:

> !       /* [conv.integral] does not allow conversions between two different
> !   enumeration types.  */
> !       if (TREE_CODE (type) == ENUMERAL_TYPE
> !    && TREE_CODE (expr_type) == ENUMERAL_TYPE
> !    && !same_type_ignoring_top_level_qualifiers_p (type, expr_type))
> !    return error_mark_node;

It seems wrong to special-case this.  Perhaps we should call can_convert
instead?

Jason


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