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

Loop controlled by unsigned char counter iterates more than 255 times

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Code Generation Tools
    • CODEGEN-5574
    • Hide
      C6000_8.2.0
      C2000_18.1.0.LTS
      C6000_8.3.0
      C7000_1.4.0.LTS*
      ARM_18.12.0.LTS
      PRU_2.3.0
      ARM_18.1.0.LTS
      MSP430_18.1.0.LTS
      C2000_19.6.0.STS
      PRU_2.4.0*
      ARM_19.6.0.STS
      MSP430_18.12.0.LTS
      MSP430_19.6.0.STS
      MSP430_16.9.0.LTS
      C2000_18.12.0.LTS
      Show
      C6000_8.2.0 C2000_18.1.0.LTS C6000_8.3.0 C7000_1.4.0.LTS* ARM_18.12.0.LTS PRU_2.3.0 ARM_18.1.0.LTS MSP430_18.1.0.LTS C2000_19.6.0.STS PRU_2.4.0* ARM_19.6.0.STS MSP430_18.12.0.LTS MSP430_19.6.0.STS MSP430_16.9.0.LTS C2000_18.12.0.LTS
    • Hide
      MSP430_18.12.2.LTS
      ARM_18.1.6.LTS
      MSP430_18.1.6.LTS
      PRU_2.3.2
      C2000_19.6.0.STS
      C2000_18.1.6.LTS
      C2000_18.12.2.LTS
      PRU_2.4.0*
      ARM_19.6.0.STS
      ARM_18.12.2.LTS
      C6000_8.3.4
      C6000_8.2.7
      MSP430_19.6.0.STS
      Show
      MSP430_18.12.2.LTS ARM_18.1.6.LTS MSP430_18.1.6.LTS PRU_2.3.2 C2000_19.6.0.STS C2000_18.1.6.LTS C2000_18.12.2.LTS PRU_2.4.0* ARM_19.6.0.STS ARM_18.12.2.LTS C6000_8.3.4 C6000_8.2.7 MSP430_19.6.0.STS
    • Compile at -o1 or less, or restructure the loop to make it not need the 8-bit wraparound.
    • Hide
      A do-while loop with an unsigned loop variable narrower than int can miss one of its wraparound cases, for instance if the loop counts down and the counter starts at zero. The compiler may promote the variable to int, making it wider than the original and thus it will experience a much larger count when it wraps.
      Show
      A do-while loop with an unsigned loop variable narrower than int can miss one of its wraparound cases, for instance if the loop counts down and the counter starts at zero. The compiler may promote the variable to int, making it wider than the original and thus it will experience a much larger count when it wraps.

      Loop controlled by unsigned char counter iterates more than 255 times

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

              Created:
              Updated:
              Resolved: