This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: warning: dereferencing type-punned pointer will break strict-aliasing rules
- From: Jeffrey Holle <jeffreyholle at bellsouth dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 24 Jul 2007 20:20:06 -0400
- Subject: Re: warning: dereferencing type-punned pointer will break strict-aliasing rules
- References: <f8600s$ad$1@sea.gmane.org> <46A687E1.76D5243B@dessent.net>
- Reply-to: jeffreyholle at bellsouth dot net
Brian Dessent wrote:
The best bet is to fix the invalid code. The next best thing is
probably -fno-strict-aliasing. This is a frequent and somewhat
sensitive topic on this mailing list, so I suggest you read the past
threads, e.g.
<http://www.google.com/search?num=100&q=site%3Agcc.gnu.org+inurl%3Aml+inurl%3A%22gcc-help%22+strict+aliasing+rules>.
Brian
Thanks for this, the -fno-strict-aliasing has stopped the warnings.
I asked here because the www.gcc.gnu.org server appears to be down.