This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] [PR3671] Disallow conversion between enumerationtypes in template deduction
- From: Jason Merrill <jason at redhat dot com>
- To: "Giovanni Bajo" <giovannibajo at libero dot it>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 06 Jul 2004 18:54:08 -0400
- Subject: Re: [C++ PATCH] [PR3671] Disallow conversion between enumerationtypes in template deduction
- References: <01db01c462c1$b71ba930$a54a2597@bagio>
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