This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: identifying c++ aliasing violations
- From: "Giovanni Bajo" <rasky at develer dot com>
- To: "Jack Howarth" <howarth at bromo dot msbb dot uc dot edu>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Mon, 5 Dec 2005 09:03:28 +0100
- Subject: Re: identifying c++ aliasing violations
- References: <20051205010733.BA5F41DC06D@bromo.msbb.uc.edu>
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