[PATCH] Fix middle-end/15618, bool_var != 0 (== 1) -> bool_var

Roger Sayle roger@eyesopen.com
Tue May 3 02:48:00 GMT 2005


On Mon, 2 May 2005, Andrew Pinski wrote:
>
> 	* fold-const.c (fold_widened_comparison): Treat BOOLEAN_TYPE
> 	the same as INTEGER_TYPE.
> 	(fold_binary): Fold "bool_var != 0" to bool_var.
> 	Fold "bool_var == 1" to bool_var.
>

This is Ok for mainline.

Thanks,

Roger
--



More information about the Gcc-patches mailing list