Switching off optimization for a specific function in gcc 4.2.2

前端 未结 7 2219
执笔经年
执笔经年 2020-12-16 16:24

Is it possible to switch off optimization of a specific function? A friend of mine has the problem that the gcc optimization makes some (unknown to me) µ-controller-code not

7条回答
  •  爱一瞬间的悲伤
    2020-12-16 16:56

    I know this is an old post. The GCC page that OP gives actually says: To keep such calls from being optimized away, put asm (""); in the function. I guess this is an easy workaround. Just fine out this, hope it can helper other people like me.

提交回复
热议问题