Re: [Development] Pointer aliasing problem in optimized gcc builds

2013-09-15 Thread Soroush Rabiei
Ah sorry, I can't reproduce the issue after a complete recompile. I think the problem is caused by an outdated object file that is not marked to be recompiled by mingw32-make. Looks like mingw32-make and make (in Linux) work differently... (Any problem with time-stamps on windows?) I did some test

Re: [Development] Pointer aliasing problem in optimized gcc builds

2013-09-13 Thread Konstantin Tokarev
13.09.2013, 19:51, "Thiago Macieira" : > On sexta-feira, 13 de setembro de 2013 17:22:32, Olivier Goffart wrote: > >>>  * How bad are -O3 compiles? I've read that it's completely safe for >>>  well-written code but using optimization aggressively, may cause undefined >>>  behavior or even runtime

Re: [Development] Pointer aliasing problem in optimized gcc builds

2013-09-13 Thread Thiago Macieira
On sexta-feira, 13 de setembro de 2013 20:13:30, Konstantin Tokarev wrote: > 13.09.2013, 19:51, "Thiago Macieira" : > > On sexta-feira, 13 de setembro de 2013 17:22:32, Olivier Goffart wrote: > >>> * How bad are -O3 compiles? I've read that it's completely safe for > >>> well-written code but usi

Re: [Development] Pointer aliasing problem in optimized gcc builds

2013-09-13 Thread Olivier Goffart
On Friday 13 September 2013 15:55:45 Soroush Rabiei wrote: > Hi everybody > > > I'm using a custom build of Qt 5.1.1 compiled with GCC 4.8.1 on > Windows (MinGW builds x86_64). For some performance reasons I have to > enable "-O3" flag until my project is ported out of Qt. The Qt was > built with

Re: [Development] Pointer aliasing problem in optimized gcc builds

2013-09-13 Thread Thiago Macieira
On sexta-feira, 13 de setembro de 2013 17:22:32, Olivier Goffart wrote: > > * How bad are -O3 compiles? I've read that it's completely safe for > > well-written code but using optimization aggressively, may cause undefined > > behavior or even runtime crashes for bad codes. How is Qt code? I've on

[Development] Pointer aliasing problem in optimized gcc builds

2013-09-13 Thread Soroush Rabiei
Hi everybody I'm using a custom build of Qt 5.1.1 compiled with GCC 4.8.1 on Windows (MinGW builds x86_64). For some performance reasons I have to enable "-O3" flag until my project is ported out of Qt. The Qt was built with C++11 support. When program tries to append an item to a container it