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

ltoa definition conflicts with quasi-standard ltoa

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Code Generation Tools
    • CODEGEN-1154
    • SDSCM00052006
    • Hide
      ARM_5.2.4
      C2000_16.9.0.LTS
      C6000_8.2.0
      C6000_8.3.0
      ARM_18.12.0.LTS
      PRU_2.3.0
      ARP32_1.1.0*
      ARM_18.1.0.LTS
      MSP430_18.1.0.LTS
      ARM_16.9.0.LTS
      C6000_8.1.0B1
      MSP430_18.12.0.LTS
      MSP430_16.9.0.LTS
      C2000_18.12.0.LTS
      Show
      ARM_5.2.4 C2000_16.9.0.LTS C6000_8.2.0 C6000_8.3.0 ARM_18.12.0.LTS PRU_2.3.0 ARP32_1.1.0* ARM_18.1.0.LTS MSP430_18.1.0.LTS ARM_16.9.0.LTS C6000_8.1.0B1 MSP430_18.12.0.LTS MSP430_16.9.0.LTS C2000_18.12.0.LTS
    • Hide
      C2000_19.6.0.STS
      PRU_2.3.2
      C6000_8.3.3
      ARM_19.6.0.STS
      C6000_8.2.6
      ARP32_1.1.0*
      MSP430_19.6.0.STS
      Show
      C2000_19.6.0.STS PRU_2.3.2 C6000_8.3.3 ARM_19.6.0.STS C6000_8.2.6 ARP32_1.1.0* MSP430_19.6.0.STS
    • Hide
      Potential workarounds:
      1) Avoid using ltoa, which is not a standard C function. You can use sprintf instead.
      2) At every call site, check whether the compiler is a version of the TI compiler with the incorrect definition:
      #if defined(__TI_COMPILER_VERSION__) && \
          (((defined(__TI_ARM__) || defined(__MSP430__) || defined(__TMS320C2000__)) && __TI_COMPILER_VERSION__ < 19006000) || \
           (defined(__ARP32__) && __TI_COMPILER_VERSION__ < 1001000) || \
           (defined(__PRU__) && __TI_COMPILER_VERSION__ < 2003002) || \
           (defined(__TMS320C6X__) && __TI_COMPILER_VERSION__ < 8002006) || \
           (defined(__TMS320C6X__) && __TI_COMPILER_VERSION__ >= 8003000 && __TI_COMPILER_VERSION__ < 8003003))
          ltoa(1234, buffer);
      #else
          ltoa(1234, buffer, 10);
      #endif
      Show
      Potential workarounds: 1) Avoid using ltoa, which is not a standard C function. You can use sprintf instead. 2) At every call site, check whether the compiler is a version of the TI compiler with the incorrect definition: #if defined(__TI_COMPILER_VERSION__) && \     (((defined(__TI_ARM__) || defined(__MSP430__) || defined(__TMS320C2000__)) && __TI_COMPILER_VERSION__ < 19006000) || \      (defined(__ARP32__) && __TI_COMPILER_VERSION__ < 1001000) || \      (defined(__PRU__) && __TI_COMPILER_VERSION__ < 2003002) || \      (defined(__TMS320C6X__) && __TI_COMPILER_VERSION__ < 8002006) || \      (defined(__TMS320C6X__) && __TI_COMPILER_VERSION__ >= 8003000 && __TI_COMPILER_VERSION__ < 8003003))     ltoa(1234, buffer); #else     ltoa(1234, buffer, 10); #endif
    • Hide
      For a long time, the TI RTS has defined a function named ltoa, with a prototype in stdlib.h, for use as a helper function in printf. However, there was already a quasi-standard function ltoa with a different prototype which had been floating around the net for even longer. The presence of TI's definition causes a "too many arguments" error or "incompatible redeclaration" error for applications which attempt to use the quasi-standard ltoa.

      This defect has been resolved by renaming TI's ltoa to something in the implementation namespace. Additionally, we've added a definition of ltoa conforming to the quasi-standard version.
      Show
      For a long time, the TI RTS has defined a function named ltoa, with a prototype in stdlib.h, for use as a helper function in printf. However, there was already a quasi-standard function ltoa with a different prototype which had been floating around the net for even longer. The presence of TI's definition causes a "too many arguments" error or "incompatible redeclaration" error for applications which attempt to use the quasi-standard ltoa. This defect has been resolved by renaming TI's ltoa to something in the implementation namespace. Additionally, we've added a definition of ltoa conforming to the quasi-standard version.

      For a long time, the TI RTS has defined a function named ltoa, with a prototype in stdlib.h, for use as a helper function in printf. However, there was already a quasi-standard function ltoa with a different prototype which had been floating around the net for even longer. The presence of TI's definition causes a "too many arguments" error or "incompatible redeclaration" error for applications which attempt to use the quasi-standard ltoa.

      This defect has been resolved by renaming TI's ltoa to something in the implementation namespace. Additionally, we've added a definition of ltoa conforming to the quasi-standard version.

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

              Created:
              Updated:
              Resolved: