Now it is working if I set optimization to level 1 in the MPLAP gcc preferences for this project.
But my question is, what is the gcc doig, if I set optimization to level 0 I the gcc settings? Is it in this case anyways doing optimization with level 1 after using this pragma?
How long is this pragma setting valid, only for this .c or .h file, or for the complete project, ...?
Or how could I manage this, to set the optimization level back to the level it had before setting it to 0?
Question
Tobias
hi there,
I have a question about code optimization with MPLAB/gcc.
I have a part of code which is not working while optimization is set to level 1.
So I added this pragma:
#pragma optimize 0 //Some code... #pragma optimize 1
Now it is working if I set optimization to level 1 in the MPLAP gcc preferences for this project.
But my question is, what is the gcc doig, if I set optimization to level 0 I the gcc settings? Is it in this case anyways doing optimization with level 1 after using this pragma?
How long is this pragma setting valid, only for this .c or .h file, or for the complete project, ...?
Or how could I manage this, to set the optimization level back to the level it had before setting it to 0?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.