开发者

Eclipse CDT Editor support for altivec C++ extensions?

开发者 https://www.devze.com 2022-12-16 06:27 出处:网络
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?

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.


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消