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: [tree-ssa] Improve handling of boolean conditions


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~


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