This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: identifying c++ aliasing violations
- From: howarth at bromo dot msbb dot uc dot edu (Jack Howarth)
- To: gcc at gcc dot gnu dot org
- Date: Sun, 4 Dec 2005 20:07:33 -0500 (EST)
- Subject: Re: identifying c++ aliasing violations
Richard,
Actually, while the currently offending file, dint-node.cc which
must be built with -fno-strict-aliasing, doesn't report any strict
aliasing violations in gcc 4.2, I do find that the rest of xplor-nih
is filled with them. I will report these upstream. They seem to all be
of the form..
swigpy.cc: In function 'int SWIGPY_Python_ConvertPtr(PyObject*, void**, swig_typ
e_info*, int)':
swigpy.cc:620: warning: dereferencing type-punned pointer will break strict-alia
sing rules
swigpy.cc: In function 'PyObject* SWIGPY_Python_NewPointerObj(void*, swig_type_i
nfo*, int)':
swigpy.cc:707: warning: dereferencing type-punned pointer will break strict-alia
sing rules
What exactly is the implication of having a hundred or more of this in
an application being built with gcc/g++ 4.x at -O3? Does it only risk
random crashes in the generated code or does it also impact the quality
of the generated code in terms of execution speed?
Jack