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.

[参考译文] ARM-CGT:ARM CGT 中的错误代码"#2710-D"关于是什么?

Guru**** 2446830 points


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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1501803/arm-cgt-what-is-the-error-code-2710-d-about-in-arm-cgt

器件型号:ARM-CGT

工具/软件:

编译器注释 #2710-D 关于什么?

使用的编译器版本:

armcl -version
TI ARM C/C++ Compiler                   v20.2.7.LTS

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

    发出诊断2710的一种方法是尝试定义 std::initializer_list 就像这样……

    % type file.cpp
    // file.cpp
    
    namespace std {
        template <int N = 5>
        class initializer_list {};
    }
    
    % armcl --display_error_number file.cpp
    "file.cpp", line 5: error #2710: invalid template parameter list for std::initializer_list (it should be one ordinary type parameter with no default)
    1 error detected in the compilation of "file.cpp".
    
    >> Compilation failure

    但这可能不是您正在做的。   

    对于在此诊断发出时编译的源文件、 请遵循 如何提交编译器测试用例一文中的说明

    谢谢。此致、

    -乔治

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

    啊、谢谢您的澄清。

    我不能举出例子、我刚才发现我们把这句话订错了。 我想知道为什么我们这样做。

    我们处于`C`工程中、因此如果这只是`C++`警告、我们可以删除该设置。

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

    您好:

    请注意,由于某些假期/假期,可能需要几天的时间才能得到答复。

    谢谢你

    Ki