This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
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 18:55:18 -0400
- Subject: warning: dereferencing type-punned pointer will break strict-aliasing rules
- Reply-to: jeffreyholle at bellsouth dot net
I am using gcc version 4.1.2.
I am writing a Boost.Build based system to build wxWidgets using
applications.
This build system has default build variants "debug" and "release".
On release builds, wxWidgets code emits a lot of these warnings:
warning: dereferencing type-punned pointer will break strict-aliasing
rules
Questions:
1. Are these warnings benign? If so can they be suppressed?
2. If not, what level of optimization should I regress to avoid these
warnings?