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

Keil5 compiler issue

Since I use level 3 (-O3) optimization in keil5,it is irrelevant with the with the value of the sentence

 " !IS_POOL_ALIGNED(pPool, OS_MEM_POOL_BASE_ALIGN) ",

the judgement  "if (!IS_POOL_ALIGNED(pPool, OS_MEM_POOL_BASE_ALIGN))" is always true,

so I always get "return LOS_NOK"

But if I use level 0 (-O0) , every thing is fun, why?

 if (!IS_POOL_ALIGNED(pPool, OS_MEM_POOL_BASE_ALIGN))
        return LOS_NOK;