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

Allow disabling workaround diagnostic for CLA integer comparison issue

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Implemented
    • Icon: Medium Medium
    • Code Generation Tools
    • CODEGEN-7515
    • Hide
      C2000_22.6.0.LTS
      C2000_20.2.1.LTS
      C2000_21.6.1.LTS
      Show
      C2000_22.6.0.LTS C2000_20.2.1.LTS C2000_21.6.1.LTS
    • Hide
      C2000_22.6.1.LTS*
      C2000_21.6.2.LTS*
      Show
      C2000_22.6.1.LTS* C2000_21.6.2.LTS*
    • default

      Suppose a customer is aware of the problem with integer comparisons on CLA, and does not want the compiler to use the workaround. They are willing to guarantee the values of the comparison are never in the problem range, and want to avoid the code size caused by the workaround. It seems like this would work ...

      % type file.cla
      int fxn(int a, int b)
      {
         return a < b;
      }
      
      % cl2000 --cla_support --diag_suppress=30013 file.cla
      "file.cla", line 3: warning #30013-D: Comparison operation uses integer
         comparison instruction, which does not operate properly for values that
         would overflow subtraction.  Use --cla_signed_compare_workaround=on to have
         the compiler work around this issue.
      

      The --diag_suppress is ignored.

      Please change the compiler to handle diagnostic 30013 like all the others.

      For more context, please see the related forum thread.

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

              Created:
              Updated:
              Resolved: