[patch] Deal with larger anti-ranages in compare_range_with_value
James A. Morrison
ja2morri@csclub.uwaterloo.ca
Wed Jul 27 18:50:00 GMT 2005
Tom Truscott <trt@unx.sas.com> writes:
> Interesting. But don't EQ/NE work the same way?
> E.g. ~[0,1] != 0 should be considered true, I think.
> Something like:
Yes they do. I realized this this morning.
> /* VAL_1 <= VAL <= VAL_2 implies ~[VAL1, VAL2] != VAL */
> if ((min_comp == 0 || min_comp == -1) && (max_comp == 0 || max_comp == 1))
> return (comp == NE_EXPR) ? boolean_true_node : boolean_false_node;
>
> Tom Truscott
>
--
Thanks,
Jim
http://www.csclub.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim
More information about the Gcc-patches
mailing list