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

Compiler handles void pointer math inconsistently

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Code Generation Tools
    • CODEGEN-7931
    • Hide
      C7000_1.4.0.LTS
      MSP430_20.2.0.LTS
      C2000_20.8.0.STS
      ARM_20.2.0.LTS
      C2000_20.2.0.LTS
      Show
      C7000_1.4.0.LTS MSP430_20.2.0.LTS C2000_20.8.0.STS ARM_20.2.0.LTS C2000_20.2.0.LTS
    • Hide
      C7000_1.4.1.LTS*
      MSP430_21.2.0.BETA1*
      C2000_20.2.3.LTS*
      ARM_20.2.3.LTS*
      MSP430_20.2.3.LTS*
      Show
      C7000_1.4.1.LTS* MSP430_21.2.0.BETA1* C2000_20.2.3.LTS* ARM_20.2.3.LTS* MSP430_20.2.3.LTS*
    • default
    • To work around this issue, replace all of the "void *" pointers with "unsigned char *"
    • The C standard does not allow pointer arithmetic on pointers to void. As an extension to the language, the TI compiler allows this in relaxed mode, in which case the arithmetic should behave as though it were arithmetic on "unsigned char *".

      The C standard does not allow pointer arithmetic on pointers to void. As an extension to the language, the TI compiler allows this in relaxed mode, in which case the arithmetic should behave as though it were arithmetic on "unsigned char *". For this bug, if given an expression of the form "void *" plus or minus an integer constant, the compiler may incorrectly drop the constant offset.

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

              Created:
              Updated:
              Resolved: