Re: [PATCH] Remove introduction of undefined overflow in emit_case_bit_test.

2012-08-06 Thread Richard Guenther
On Mon, Aug 6, 2012 at 1:31 AM, Tom de Vries wrote: > Richard, > > the code in emit_case_bit_tests currently introduces a MINUS_EXPR in signed > type > (without checking if signed types wrap or not), which could mean introduction > of > undefined overflow. > > This patch fixes this problem by pe

[PATCH] Remove introduction of undefined overflow in emit_case_bit_test.

2012-08-05 Thread Tom de Vries
Richard, the code in emit_case_bit_tests currently introduces a MINUS_EXPR in signed type (without checking if signed types wrap or not), which could mean introduction of undefined overflow. This patch fixes this problem by performing the MINUS_EXPR in an unsigned type. Doing so also enables the