RFC: -Wstrict-aliasing extension

tm_gccmail@kloo.net tm_gccmail@kloo.net
Sat Feb 28 04:49:00 GMT 2004


On 27 Feb 2004, Jim Wilson wrote:

> On Fri, 2004-02-27 at 15:06, tm_gccmail@kloo.net wrote:
> > Could we use a phrase other than "type-punning"? I'm not sure most people
> > would understand that term. 
> 
> type-punning is what the current warning uses.  All my code does is add
> a second message that changes "will" to "may".  So I think changing the
> wording is a separate issue from my proposal.
> 
> I don't see any use of the word "pun" in the ISO C standard, so I see no
> reason why we have to keep this wording.  Did you want to suggest
> something different?  Maybe something using the word "cast" instead of
> "type-punned"?

Doh, I already deleted the original message, so I don't remember the
original wording.

How about something like "changing the type of a pointer via casting may
cause incorrect code to be generated if the pointer is dereferenced (due
to aliasing rules)" ?

That is a bit wordy though.

Toshi




More information about the Gcc-patches mailing list