This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Warning for different pointer signedness
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