unsigned / double propagation weirdness?
Segher Boessenkool
segher@kernel.crashing.org
Tue Feb 24 19:33:00 GMT 2004
On 24-feb-04, at 13:23, Robert Dewar wrote:
> Joe Buck wrote:
>
>> So the warning would only be generated if an unsigned negation is
>> widened (or potentially widened, in the case of conversions to long,
>> to alert the programmer to portability issues).
>> This should eliminate Robert's concerns about intentional use of -
>> for two's complement: in such cases, the result would not be widened.
>
> Yes, that sounds right, although I wonder how common this case is ...
Well there's other cases resulting in the same problem as well...
See e.g. http://gcc.gnu.org/ml/gcc-patches/2003-12/msg01303.html .
Segher
More information about the Gcc
mailing list