Warning for different pointer signedness

Andrew Pinski pinskia@physics.uc.edu
Mon Dec 20 22:51:00 GMT 2004


On Dec 20, 2004, at 5:46 PM, Joe Buck wrote:

> Sorry, Gaby, I don't buy this argument, given the C aliasing rules.
> C says a pointer to unsigned T and a pointer to signed T can point to
> the same object.  C specifies the meaning of the foo routine above.
> There is no ambiguity with the code.  I think that we were right 
> before,
> when we warned about this code only when -pedantic was specified.

But remember this was a yet another undocumented extension which
just so happened not to do so much harm.
Maybe the correct fix was to document it but that is what the JSM
wanted and nobody yelled when Mike proposed this in the first
place.

-- Pinski



More information about the Gcc mailing list