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.

[参考译文] TMS320F280037C:STATIC_ASSERT 错误消息

Guru**** 2483545 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1444890/tms320f280037c-static_assert-error-message

器件型号:TMS320F280037C

工具与软件:

你(们)好、

我试图在我的代码中使用 static_assert()。 当我添加它、assert 表达式为 true 时、效果良好。 表达式为 false 时、我收到错误消息:

错误#95:数组大小必须大于零

是什么

#include "assert.h"

无效测试(void)


 static_assert (1===2、"这是一个测试");

}

我使用 CCS v12.8.0.00012和编译器 TI v22.6.0.1.LTS

谢谢

Andrew