Switching off optimization for a specific function in gcc 4.2.2

前端 未结 7 2108
执笔经年
执笔经年 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:38

    If the pragma won't work for you, try splitting the function into its own file, and then compile that file without the optimisation flag set.

提交回复
热议问题