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.

_cpluplus symbol

Part Number: TMS320F28379D


Tool/software: TI C/C++ Compiler

Hello,

I have just installed new CCS v9.2.0. I made new project and compiled it with TI v18.12.3 LTS compiler regularly.

I noticed in editor that line

#ifndef __cplusplus

is highlighted even I use .c files.

I checked in project properties and option: treat c files as cpp files (--cpp_default) is not chacked.

So, I expect that _cplusplus  is not defined.

Please help.

  • Is this in a file from TI or in a file of your own? When you say the code was highlighted, do you mean the code appeared to be included in the compilation? It is an ifndef, so it makes sense that the code would be included in a non-C++ file.

    Whitney

  • I compiled .c files but I got _cplusplus defined so part of my code with

    ifndef _cplusplus ...

    is skipped, instead of that that part of code has to be included and it has not be highlighted.

    I noticed difference between ccsv9 and ccsv8. With ccsv8 everething works fine.

  • Okay. Is it compiling correctly at least? If you look at the assembly that is generated, is the expected code there? I'm trying to determine if it's an issue in the compiler settings or if CCS is just highlighting things incorrectly and making it look like the code is being skipped.

    Whitney

  • I checked in appropriate .map file and code is placed in right and expected place.
    It looks that _cplusplus is not defined so my conclusion is only editor highlighted code incorectly.

    I also defined predefined symbols like CPU1 or _FLASH and those parts of code editor highlighted corectly.

    At least, I have problem only with highlighting _cplusplus part of code.

  • Hi,

    It seems I can reproduce this issue here as well. I am loading the example code 2837x_vcu2_rifft_64 and all code portions that are under a #ifdef __cplusplus are active.

    This is an identical issue as the one reported earlier this year. I will check a few additional things and report back.

    https://e2e.ti.com/support/tools/ccs/f/81/t/778161

    I apologize for the inconvenience,

    Rafael

  • fill said:
    It looks that _cplusplus is not defined so my conclusion is only editor highlighted code incorectly.

    This appears to be a bug in CCS 9.2. As you noted it works correctly up until CCS 8.2, but not in 8.3 and higher. I filed a defect to track this issue. The tracking ID is CCSIDE-3722. Please feel free to track its status using the SDOWP link in my signature.