Re: How to get rid of this warning?: dereferencing type-punned pointer will break strict-aliasing rules

From: Jan Panteltje (pNaonStpealmtje_at_yahoo.com)
Date: 10/10/05


Date: Mon, 10 Oct 2005 17:20:42 GMT

On a sunny day (Mon, 10 Oct 2005 14:42:12 +0200) it happened Bernd Strieder
<strieder@informatik.uni-kl.de> wrote in <didnj4$gh$1@news.uni-kl.de>:

>Hello,
>
>Jan Panteltje wrote:
>
>> warning: dereferencing type-punned pointer will break strict-aliasing
>> rules
>
>Try -fno-strict-aliasing as option to gcc. However, this might defeat
>some optimization.
>
>Use google with the error message as search key to get more on the
>background.
>
>Bernd Strieder
>
That works, clean compile!
More re-assuring to users when the compiles are clean :-)
Many thanks.



Relevant Pages