This is the mail archive of the gcc-help@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: Ask for help


If your meaning for the word "performance" is the usual meaning, the earlier response by Andrew Haley answers the whole question.

But the way you phrased the question makes me think you meant "behavior" when you wrote "performance".

-fno-strict-aliasing can give you correct behavior from a program that incorrectly uses a reinterpret_cast or similar operation. That should be considered a bug, and if there are few of those in your code, you should find and correct them.

Some old code has enough incorrect reinterpret_cast operations that correcting them is impractical and you need the -fno-strict-aliasing

I'm not sure what -DNDEBUG or -static might change in the behavior or performance of your code. I'm just guessing that -fno-strict-aliasing is the important difference.

Wei, Wanxia wrote:
gcc -m32 -O3 -DNDEBUG -fno-strict-aliasing -static –lm

gcc -m32 –O3 –lm

...
 the
different performance of the two executables of my C program means there are bugs in
this program?



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