Search code examples
c++g++eclipse-cdtaltivec

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?

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.


Solution

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