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.

[参考译文] TMS570LC4357:安全库2.4.0和编译器选项语言模式="严格 ANSI 模式"

Guru**** 2467740 points


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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/666573/tms570lc4357-safety-library-2-4-0-and-compiler-option-language-mode-strict-ansi-mode

器件型号:TMS570LC4357

您好!

我尝试使用编译器选项"严格 ANSI 模式"来编译安全库2.4.0 (编译器版本16.9.3)。 我遇到以下错误和警告:

错误:

SL_ASM_API.asm <-转换单元必须至少包含一个声明

警告:

在 .cdecls 指令中处理 C 代码时、sl_asm_api.asm <-[E1000]错误

sl_priv.c <-#188 D 无符号整数与零之间的无意义比较

types.h <-#2104 D Attribute "packed"不适用于此处

如何解决此错误/警告。

此致

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

    你是对的。 该库的当前版本仅支持宽松 ANSI 模式、不支持严格 ANSI 模式。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!
    它是否旨在将安全库更改为严格的 ANSI?
    此致
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好 Lars、

    我们没有计划遵循严格 ANSI 的规则。