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.

[参考译文] TI-CGT-armlvm_1.3.0.LTS tiarmclang 报告"错误:不支持 C++异常"

Guru**** 2531950 points


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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1003378/ti-cgt-armllvm_1-3-0-lts-tiarmclang-reports-error-c-exceptions-not-supported

TI-CGT-armllvm_1.3.0.LTS 包含 EXT_EP-10343的修复 程序"编译器不支持使用 C++异常的链接代码"。

但是、对于 ARMCLANG_1.3.0.LTS、 当尝试使用-fexceptions 时、我始终会收到"error:C++ exceptions not supported (错误:不支持 C++异常)"。

例如,EXT_EP-10343说明中的以下简单示例:

$ cat hello.cpp
#include <iostream>

int main()
{
   std::cout << "Hello, world!" << std::endl;
   return 0;
}

$ ~/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0.LTS/bin/tiarmclang -fexceptions -mcpu=cortex-m0 hello.cpp -o hello.out -Wl,-c
tiarmclang: error: C++ exceptions not supported.

 在 ARMCLANG_1.3.0.LTS 的发行说明中、我无法看到 不再支持-Fexceptions、这是否是一个错误?

我已检查 Linux 和 Windows 下的 ARMCLANG_1.3.0.LTS 是否出现相同的错误。

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

    虽然 tiarmclang 编译器长期支持 C++异常、但短期内不支持这些异常。  这就是  EXT_EP-10343修复 程序发出该诊断的原因。   

    谢谢、此致、

    乔治