Compiler inconsistently issues warning: use of "=" where "==" may have been intended

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: Low

      The attached file has 4 if statements similar to ...

          if (g1 = g2)
      

      For all 4 if statements, the customer expects the compiler to issue a diagnostic about using = in an if statement, when == is probably intended. In 1 case, a diagnostic is issued. But in the other cases, no diagnostic is issued.

      Build it ...

      % cl2000 --verbose_diagnostics file.c
      "file.c", line 14: warning: use of "=" where "==" may have been intended
            if (arg = 10)   // warning
                ^
      

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

              Created:
              Updated:

                Connection: Intermediate to External PROD System
                EXTSYNC-5923 - Compiler inconsistently issues warn...
                SYNCHRONIZED
                • Last Sync Date: