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

#pragma push , is not supported by ARM Compiler 6, what should I do ?

void function1(void){
... // Optimized at O1 (from armcc -O1)
}
#pragma push
#pragma O3
void function2(void){
... // Optimized at O3
}
#pragma pop
void function3(void){
... // Optimized at O1 (from armcc -O1)
}

How do we find an alternative way?

Parents
  • disappointed.    that means I cannot set different Onum for a section in a source file.     It's a backslide .  ARM Complier  V5. is better and stronger.  

     I want to set different levels of optimization for different sections  In a C source file

    I found some error on O1 in Complier 6.16  for a whole C source  , but I need  some section O1. the other part use O0.

Reply
  • disappointed.    that means I cannot set different Onum for a section in a source file.     It's a backslide .  ARM Complier  V5. is better and stronger.  

     I want to set different levels of optimization for different sections  In a C source file

    I found some error on O1 in Complier 6.16  for a whole C source  , but I need  some section O1. the other part use O0.

Children
  • The single C source file can be broken up into multiple C files, so that the Onum option can be applied at a file level.

    I found some error on O1 in Complier 6.16  for a whole C source

    If your program displays different logical behaviour when compiling with different optimization options, then the program is likely to have a bug.