[C++ PATCH] [PR3671] Disallow conversion between enumeration types in template deduction
Jason Merrill
jason@redhat.com
Tue Jul 6 22:59:00 GMT 2004
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
More information about the Gcc-patches
mailing list