Eclipse CDT 编辑器支持 altivec C++扩展?

发布于 2024-08-17 04:28:39 字数 232 浏览 2 评论 0原文

Eclipse CDT C++ 编辑器是否有支持 Altivec C++ 语言扩展的方法,例如在使用 -maltivec 编译时在 GNU g++ 编译器中实现的方法?

具体来说,是否可以停止将向量数据类型报告为语法错误? 例如

vector unsigned char foo;

声明一个名为“foo”的 128 位向量变量,其中包含 16 个 8 位无符号字符。

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?

Specifically, can it be made to stop reporting the vector data types as syntax errors?
e.g.

vector unsigned char foo;

declares a 128-bit vector variable named "foo" containing sixteen 8-bit unsigned chars.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无言温柔 2024-08-24 04:28:39

不。据说可以扩展 CDT 索引器来识别新的语言元素,但我认为这不能用于现有的工具链定义。

也就是说,解决(或解决)这个特定问题的最简单方法是将向量定义为空预处理器符号(项目属性 -> C/C++ 常规 -> 路径和符号 ->符号)。

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.

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).

不交电费瞎发啥光 2024-08-24 04:28:39

Eclipse CDT 有两个 C++ 解析器,其中之一旨在兼容 GNU,目前缺乏对 Altivec 的支持。第二个目标是与 XLC 兼容,并且对程序代码中的 Altivec 类型提供语法支持(但不支持语义!),还支持一些 GNU 扩展。

可以从 Eclipse CDT CVS 获取(查找 java 包 org.eclipse.cdt.core.lrparser.xlc)

安装 XLC 解析器后,可以使用“语言映射”属性页面选择它以切换到 XLC C++ 解析器。

The Eclipse CDT has two C++ parsers, one of which aims for GNU compatibility and currently lacks support for 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.

That can be gotten from Eclipse CDT CVS (look for the java package 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文