This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Improve handling of boolean conditions
- From: Richard Henderson <rth at redhat dot com>
- To: law at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 10 Feb 2004 00:35:01 -0800
- Subject: Re: [tree-ssa] Improve handling of boolean conditions
- References: <200402100313.i1A3DsNW001242@speedy.slc.redhat.com>
On Mon, Feb 09, 2004 at 08:13:54PM -0700, law@redhat.com wrote:
> + && TREE_TYPE (op0) == boolean_type_node
Direct pointer comparison is dangerous. Need either
TREE_CODE (TREE_TYPE (op0)) == BOOLEAN_TYPE
or
TYPE_MAIN_VARIANT (TREE_TYPE (op0))
== TYPE_MAIN_VARIANT (boolean_type_node)
Really, we need c++'s same_type_p to be generic...
r~