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: disable gcc optimization of some parts of code...


jonatan perry wrote:
Hi,
I have some arithmetic calculation that the GCC optimizer optimize
(e.g. a=8+8 become a=16....). who can I disable it from doing that on
some of the parts in the code? something like MACRO commands.... if
you have any other ideal I'll be happy to hear...

Factor your code so that the part you don't want optimized appears in it's own unit (e.g. .o file) and build makefile that turns off optimization for that object.


Alternatively, and probably more appropriate, just debug why the optimizer is causing problems and fix the bug in your code (or report a gcc bug).

Tom


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