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.

Fine-grained extension support

Hello

The TI compiler supports a number of GCC extensions to the C and C++ languages. Now if my understanding is correct you can either enable all of them, or none. I wonder if it wouldn't make sense to support a more fine-grained selection. In my opinion, the extensions can be grouped into

  1. those that are essentially back-ports of now standardized language constructs, such as typeof, alignof, long long types, designated initializers.
  2. those that are somewhat awkward and will make your code less portable (even if using newer language standards), such as zero-length arrays, multi-line strings, dollar signs in names, or case ranges.
  3. those that are outright dangerous as they have the potential to hide bugs in standard code, although I can only think of the abbreviation " x ?: y " for " x ? x : y " right now.

Now I think it would be great if I could simply enable the extensions in group 1, so that I could use features of e.g. C++11 (decltype (although named typeof), alignof), while avoiding the possibility to litter my code with non-standard constructs of group 2 and 3. Is this already possible somehow?

Regards

Markus

  • Markus Moll said:
    Is this already possible somehow?

    No.  This is the first I have heard of this suggestion.  This is not a trivial feature to implement.  We need to see more support for it from the community, or it is unlikely to become reality.

    Thanks and regards,

    -George