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

"if (P) X=A; else X=B;" may compile incorrectly when A and B are 0/1 and P is 0/1 with a side effect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Code Generation Tools
    • CODEGEN-1123
    • SDSCM00051809
    • Hide
      C2000_6.4.0B1
      MSP430_4.4.0B1
      ARM_5.2.0B1
      PRU_2.1.0
      Show
      C2000_6.4.0B1 MSP430_4.4.0B1 ARM_5.2.0B1 PRU_2.1.0
    • Hide
      ARM_5.2.5
      C2000_6.4.6
      PRU_2.1.2
      MSP430_4.4.5
      Show
      ARM_5.2.5 C2000_6.4.6 PRU_2.1.2 MSP430_4.4.5
    • Hide
      Typically such an IF is equivalent to "X=P" or "X=!P"; write it that way
      to avoid the problem. Adding statements to either arm of the IF can also
      help.
      Show
      Typically such an IF is equivalent to "X=P" or "X=!P"; write it that way to avoid the problem. Adding statements to either arm of the IF can also help.

      if (P) X=A; else X=B; may compile incorrectly when A and B are 0/1 and P is 0/1 with a side effect

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

              Created:
              Updated:
              Resolved: