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: [PATCH] Fix middle-end/15618, bool_var != 0 (== 1) -> bool_var



On May 2, 2005, at 10:48 PM, Roger Sayle wrote:



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.

Oh, I forgot to attach the testcases, that will remind me to forget -N on a
cvs diff. Oh well.


Attached now is the full patch which I committed.

Thanks,
Andrew Pinski


Attachment: temp.diff.txt
Description: Text document


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