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.

Compiler: C11/C++11/C++14 Roadmap

Tool/software: TI C/C++ Compiler

I was very pleased to see the announcement that C++11/14 support has been added to the TI compiler tools for ARM and MSP430. While this is a big step forward, there are quite a few missing features:

• The compiler does not support embedded C++ run-time-support libraries.
• The library supports wide chars (wchar_t), in that template functions and classes that are defined for
char are also available for wchar_t. For example, wide char stream classes wios, wiostream,
wstreambuf and so on (corresponding to char classes ios, iostream, streambuf) are implemented.
However, there is no low-level file I/O for wide chars. Also, the C library interface to wide char support
(through the C++ headers <cwchar> and <cwctype>) is limited as described above in the C library.
• Two-phase name binding in templates, as described in [tesp.res] and [temp.dep] of the standard, is not
implemented.
• The export keyword for templates is not implemented.
• A typedef of a function type cannot include member function cv-qualifiers.
• A partial specialization of a class member template cannot be added outside of the class definition.
• Constant expressions for target-specific types are only partially supported.
• New character types (introduced in the C++11 standard) are not supported.
• Unicode string literals (introduced in the C++11 standard) are not supported.
• Universal character names in literals (introduced in the C++11 standard) are not supported.
• Sequence points (introduced in the C++11 standard) are not supported.
• Atomic operations (introduced in the C++11 standard) are not supported.
• Strong compare and exchange (introduced in the C++11 standard) are not supported.
• Bidirectional fences (introduced in the C++11 standard) are not supported.
• Memory model (introduced in the C++11 standard) is not supported.
• Data-dependency ordering for atomics and memory model (introduced in the C++11 standard) is not
supported.
• Propagating exceptions (introduced in the C++11 standard) is not supported.
• Allowing atomics in signal handlers (introduced in the C++11 standard) is not supported.
• Thread-local storage (introduced in the C++11 standard) is not supported.
• Dynamic initialization and destruction with concurrency (introduced in the C++11 standard) is not
supported.

That list is from the Compiler User's Guide (spnu151r.pdf), which covers this is a lot more detail than the announcement page. A lot of those I can live without, but I was really hoping the C++11 memory model would be supported.

In addition, there are other devices which don't have any C++11 support at present. Finally there is C11, which isn't supported at all.

Is there any roadmap information available regarding which (if any) of these will be tackled, and in what order?

  • We do plan to add support for C++14 and C++11 to the compilers for C28x and C6000 devices.  This support will be the same as the support currently available in the ARM and MSP430 compilers.  

    As for the missing features, I'll have to get back to you.

    Thanks and regards,

    -George

  • Regarding these features ...

    Robert Cowsill said:
    • Atomic operations (introduced in the C++11 standard) are not supported.
    • Strong compare and exchange (introduced in the C++11 standard) are not supported.
    • Bidirectional fences (introduced in the C++11 standard) are not supported.
    • Memory model (introduced in the C++11 standard) is not supported.
    • Data-dependency ordering for atomics and memory model (introduced in the C++11 standard) is not supported.
    • Allowing atomics in signal handlers (introduced in the C++11 standard) is not supported.
    • Thread-local storage (introduced in the C++11 standard) is not supported.
    • Dynamic initialization and destruction with concurrency (introduced in the C++11 standard) is not supported.

    We plan to add these features to the ARM and MSP430 compilers.  We are unable to announce a schedule.  Please note that propagating exceptions is not among the features we plan to add.

    As for all the remaining features, there are no plans to add them.

    Thanks and regards,

    -George

  • Thanks for the extra information, George. I'm very pleased that the C++11 Memory Model and associated synchronization primitives are on the roadmap.

    Looking back over the list of unsupported features, there's one item that I don't really understand: "Sequence points (introduced in the C++11 standard) are not supported." Sequence Points were present in ANSI C and carried over into C++98. As I understand it the sequencing rules didn't change in C++11, but the terminology was updated to make sense in the context of multiple threads. Is it possible to implement the C++11 multithreaded memory model without supporting sequence points?

    Finally, just to be clear, is there no plan to implement C11 support at all?

  • Regarding sequence points ... Those are supported.  This is an error in the manual.  I overlooked it as well.  Sorry about that.  I filed CODEGEN-4833 in the SDOWP system to have the manual corrected.  You are welcome to follow it with the SDOWP link below in my signature.

    Regarding C11 ... At the present time, adding support for C11 is not on our roadmap.

    Thanks and regards,

    -George