Pet*_*ter 2 c compiler-optimization greenhills
我发现了几个用于禁用专用代码部分的 GCC 优化的代码片段。
使用编译指示 GCC 优化(0)
但我找不到 Greenhils 编译器的类似内容。
没有这样的选择吗?
小智 6
从手册中:
\n\n#pragma ghs Ostring\nTurns on optimizations. The optional string may contain any or all of the following letters:\nL \xe2\x80\x94 Loop optimizations\nM \xe2\x80\x94 Memory optimizations\nS \xe2\x80\x94 Small (but Slow) optimizations\n\n#pragma ghs ZO\nDisables all optimizations, starting from the next function.\nRun Code Online (Sandbox Code Playgroud)\n