简体   繁体   English

Eclipse CDT Editor支持altivec C ++扩展?

[英]Eclipse CDT Editor support for altivec C++ extensions?

Does the Eclipse CDT C++ editor have a means of supporting the Altivec C++ language extensions, as implemented for example in the GNU g++ compilers when compiling with -maltivec? Eclipse CDT C ++编辑器是否有支持Altivec C ++语言扩展的方法,例如在使用-maltivec进行编译时在GNU g ++编译器中实现?

Specifically, can it be made to stop reporting the vector data types as syntax errors? 具体来说,是否可以停止将矢量数据类型报告为语法错误? eg 例如

vector unsigned char foo;

declares a 128-bit vector variable named "foo" containing sixteen 8-bit unsigned chars. 声明一个名为“foo”的128位向量变量,其中包含16个8位无符号字符。

No. It is supposedly possible to extend the CDT indexer to recognize new language elements, but I don't think it can be done for an existing toolchain definition. 不。据说可以扩展CDT索引器来识别新的语言元素,但我不认为可以对现有的工具链定义进行处理。

That said, the easiest way to solve (or work around) this particular problem is to define vector as an empty preprocessor symbol (Project properties -> C/C++ General -> Paths and symbols -> Symbols). 也就是说,解决(或解决)这个特定问题的最简单方法是将vector定义为空的预处理器符号(项目属性 - > C / C ++通用 - >路径和符号 - >符号)。

The Eclipse CDT has two C++ parsers, one of which aims for GNU compatibility and currently lacks support for Altivec. Eclipse CDT有两个C ++解析器,其中一个旨在实现GNU兼容性,目前缺乏对Altivec的支持。 The second aims for compatibility with XLC, and has syntactic support for Altivec types in program code (but not semantic support!), with support for some GNU extensions too. 第二个目标是与XLC兼容,并且在程序代码中具有Altivec类型的语法支持(但不支持语义支持!),同时支持一些GNU扩展。

That can be gotten from Eclipse CDT CVS (look for the java package org.eclipse.cdt.core.lrparser.xlc) 这可以从Eclipse CDT CVS获得(查找java包org.eclipse.cdt.core.lrparser.xlc)

Once the XLC parser is installed, it can be selected using the Language Mappings properties page to switch to the XLC C++ parser. 安装XLC解析器后,可以使用Language Mappings属性页面选择它以切换到XLC C ++解析器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM