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] |
On 23/07/11 21:13, Agner Fog wrote:Actually, I think we can have the cake and eat it here. If gcc behaves reasonably safe by default and then makes warnings in case of missed optimization opportunities. The programmer should then have the opportunity to enable the desired optimizations, for example with pragmas at the critical places in the code. If the programmer doesn't need the best optimization then he would not enable those warnings and would be safe without having to care.5). I have tested many different C++ compilers, and gcc turned out to be the one that optimizes best.Well yes, and one of the reasons for this is that we take advantage of integer overflow being undefined. There is an entire class of optimizations (loop induction variable optimization) that is difficult of impossible without taking advantage of this. We don't do this kind of thing without good reason.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |