This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: identifying c++ aliasing violations


Jack Howarth <howarth@bromo.msbb.uc.edu> 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 execution speed?


The main problem is wrong-code generation. Assuming the warning is right and
does not mark false positives, you should have those fixed. I don't think
quality of the generated code would be better with this change.

However, it's pretty strange that C++ code generation is worse with GCC 4: I
saw many C++ programs which actually got much faster due to higher lever
optimazations (such as SRA). You should really try and identify inner loops
which might have been slowed down and submit those as bugreports in our
Bugzilla.

Giovanni Bajo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]