This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] 编译器/CC3200SDK:编译器/优化问题- 5.2 3.08编译器

Guru**** 2382480 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/655656/compiler-cc3200sdk-compiler-optimisation-issue---ti5-2-8-compiler

部件号:CC3200SDK

工具/软件:TI C/C++编译器

我注意到了我认为是5.2 Tm8编译器存在的问题

此片段:

current_message =(current_message++)% 4;

在循环之前将达到4。 就像在% 4之后应用++

如果我将其更改为:

current_message =(current_message+1)% 4;

我得到预期的行为-0,1,2,3,0等

优化级别为4,速度与大小为0 (大小)

现在我明白了,这不是问题,但肯定是错的。

我知道5.2 Tm8不是当前的编译器,但我正在使用的库需要它。