Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-10144

Including cmath causes remark: zero used for undefined preprocessing identifier "__STDC_VERSION__"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Code Generation Tools
    • CODEGEN-8389
    • Hide
      C6000_8.3.0
      MSP430_20.2.0.LTS
      ARM_18.12.0.LTS
      C2000_20.12.0.STS
      C7000_2.0.0.STS*
      ARM_20.2.0.LTS
      C2000_20.2.0.LTS
      C7000_1.4.0.LTS
      MSP430_20.12.0.STS
      MSP430_18.12.0.LTS
      C2000_18.12.0.LTS
      Show
      C6000_8.3.0 MSP430_20.2.0.LTS ARM_18.12.0.LTS C2000_20.12.0.STS C7000_2.0.0.STS* ARM_20.2.0.LTS C2000_20.2.0.LTS C7000_1.4.0.LTS MSP430_20.12.0.STS MSP430_18.12.0.LTS C2000_18.12.0.LTS
    • Hide
      ARM_20.2.5.LTS
      MSP430_21.6.0.LTS
      C2000_21.6.0.LTS
      C7000_2.0.0.STS*
      C7000_1.4.2.LTS
      MSP430_18.12.8.LTS
      C2000_20.2.5.LTS
      C2000_18.12.8.LTS
      ARM_18.12.8.LTS
      MSP430_20.2.5.LTS
      C6000_8.3.9
      Show
      ARM_20.2.5.LTS MSP430_21.6.0.LTS C2000_21.6.0.LTS C7000_2.0.0.STS* C7000_1.4.2.LTS MSP430_18.12.8.LTS C2000_20.2.5.LTS C2000_18.12.8.LTS ARM_18.12.8.LTS MSP430_20.2.5.LTS C6000_8.3.9
    • default
    • Hide
      Change header file lines identified in warning to begin with check that __STDC_VERSION__ is defined prior to checking its value:
      #if defined(_STDC_VERSION__) && __STDC_VERSION__ >= ...
      Show
      Change header file lines identified in warning to begin with check that __STDC_VERSION__ is defined prior to checking its value: #if defined(_STDC_VERSION__) && __STDC_VERSION__ >= ...

      Given a simple C++ source file with lines similar to ...

      #include <cmath>
      int a;

      Build it with remarks enabled ...

      % armcl --issue_remarks file.cpp
      "C:\ti\compilers\ti-cgt-arm_18.12.4.LTS\include\math.h", line 96: remark: zero used for undefined preprocessing identifier "__STDC_VERSION__"
      "C:\ti\compilers\ti-cgt-arm_18.12.4.LTS\include\math.h", line 110: remark: zero used for undefined preprocessing identifier "__STDC_VERSION__"

      Those lines in math.h fail to anticipate that the code may be compiled as C++, and the predefined symbol _STDC_VERSION_ is not available.  They need to rewritten similar to this line in tgmath.h ...

      #if (defined(_STDC_VERSION) && __STDC_VERSION_ >= 201112L)

       

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: