Improperly formatted if-statement slips past the syntax checker.

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 5.0
    • Component/s: tools
    • x86
    • windows_xp

      A DESCRIPTION OF THE REQUEST :
      If a semi-colon is placed right after a close-paren of an if-statement, the compiler lets it through without complaint:

      if (statement); // semi-colon here is not caught
      {
           some code;
      }

      JUSTIFICATION :
      I spent several hours trying to debug a code, thinking I had some kind of data-type error, when it was only the semi-colon.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Compiler complains or at least warns of the syntax problem.
      ACTUAL -
      Compiles without a warning or error.

      ---------- BEGIN SOURCE ----------
      This is very simple. See code above.
      ---------- END SOURCE ----------
      ###@###.### 2005-1-14 00:50:13 GMT

            Assignee:
            Unassigned
            Reporter:
            Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: