Eric Anholt <[email protected]> writes:

> ---
>
> We pass the overflow unit tests both before and after this change, but
> this should be safer.

I've seen GCC do precisely the 'optimization' you are concerned about,
but only when one of the operands is constant. One should use -fwrapv
whenever using gcc so that you get correct behavior, instead of
compiler-writers-potluck. I hope the gcc authors agree with your reading
of the spec in this case; it's getting very hard to trust them to ever
do the right thing though.

Reviewed-by: Keith Packard <[email protected]>

-- 
-keith

Attachment: signature.asc
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to