Re: identifying c++ aliasing violations

2005-12-12 Thread Philipp Thomas
On Sun, 4 Dec 2005 20:07:33 -0500 (EST), Jack Howarth wrote: >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 My recent encounters with python (in m

Re: identifying c++ aliasing violations

2005-12-05 Thread Dale Johannesen
On Dec 5, 2005, at 12:03 AM, Giovanni Bajo wrote: Jack Howarth <[EMAIL PROTECTED]> wrote: 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 q

Re: identifying c++ aliasing violations

2005-12-05 Thread Jack Howarth
Giovanni, I'll see what I can do in terms of profiling the xplor-nih code with Shark on MacOS X. However in the near term, I would strongly urge the gcc developers to backport the changes necessary to have -Wstrict-aliasing issue warnings for c++ in gcc 4.1. I rebuilt xplor-nih under gcc trunk

Re: identifying c++ aliasing violations

2005-12-05 Thread Giovanni Bajo
Jack Howarth <[EMAIL PROTECTED]> wrote: > 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 e

Re: identifying c++ aliasing violations

2005-12-04 Thread Jack Howarth
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..

Re: identifying c++ aliasing violations

2005-12-04 Thread Jack Howarth
Richard, I built current gcc 4.2 branch under MacOS X 10.4.3 and unfortunately while -Wstrict-aliasing does catch the error from PR 14024, it doesn't catch whatever strict aliasing error exists in dint-node.cc of xplor-nih. Is there a list somewhere of all those strict aliasing violations which

Re: identifying c++ aliasing violations

2005-12-04 Thread Richard Guenther
On 12/4/05, Jack Howarth <[EMAIL PROTECTED]> wrote: > In compiling xplor-nih under gcc 4.1 (it is a mix of c, c++ and fortran) > I discovered one of its c++ source files causes segfaults at optimization > levels higher than -O1 unless I add -fno-strict-aliasing to the compile > flags. In that c