This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Optimization level not working

Hi , I am working on LPC1788 with RTX , my code size is much bigger , so i want to optimize my code, after sarching through internet , there is optimization level(-O1 to -O3) specified by keil , but when i am using that optimization level(tried each level)in my code,but it is not working , not in debug mode also , why is this happened , please help or suggest.

Parents
  • What do you mean, "like" ?

    The compiler is telling you that it does not recognise what you've written - so go back to the documentation and check carefully for the correct usage, spelling, etc ...

    Remember that 'C' is case-sensitive - so "pragma" is not the same as "Pragma" ...

    If you still can't figure it out, post the complete message: copy and paste it; do not manually re-type it.

    Also show the source line(s) to which it relates.

    Follow the instructions for posting source code - they are immediately above the box where you type your message.

Reply
  • What do you mean, "like" ?

    The compiler is telling you that it does not recognise what you've written - so go back to the documentation and check carefully for the correct usage, spelling, etc ...

    Remember that 'C' is case-sensitive - so "pragma" is not the same as "Pragma" ...

    If you still can't figure it out, post the complete message: copy and paste it; do not manually re-type it.

    Also show the source line(s) to which it relates.

    Follow the instructions for posting source code - they are immediately above the box where you type your message.

Children
  • Thanks ,ok my mistake(spelling)nexttime onwards i will be carefull while posting error.

    but i have used the same syntax as follows
    #pragma push
    #pragma OT(9)
    void function(void)
    {}
    #pragma pop

    but still shows error below

    error:TEST_REPORT_FILE_GENERATE_EXTRACT\test_report_file_generate_extract.c(477): warning: #161-D: unrecognized #pragma