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.

[参考译文] 编译器/AM6548:C++源代码的 GNU 编译器问题。

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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/927528/compiler-am6548-the-gnu-compiler-problem-with-c-source-code

器件型号:AM6548

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

大家好、

我的客户使用 CCS 使用 GNU v7.2.1 (Linaro Aarch64)编译器构建 AM65x 示例代码、他能够毫无问题地构建示例代码、但如果他将源代码扩展名从 C (.c)修改为 C++(.cpp)、则会遇到编译器错误。

编译器显示错误:“命令行选项'-Wno-pointer-to -int-cast 对于 C/ObjC 有效,但对于 C++[-Werror]无效”,似乎是编译器问题,不支持 C++ 源代码的-Wno-int-pointer-inter-pointer-cast 和-Wno-pointer-to int-cast 设置。

请建议如何解决此问题、谢谢。

此致、

Luke