Empty statements are not marked as unreachable

XMLWordPrintable

    • merlin
    • generic
    • generic, solaris_2.5.1, solaris_2.6
    • Verified

      Just a semicolon in a method body is a null statement. It has the full status
      of a statement except that it is a noop.

      Hence, the following method should not compile:

      void f() {
        return;;
      }

      The second semicolon is a different statement and is unreachable. There
      should be an error reported that the second semicolon is unreachable.

            Assignee:
            Neal Gafter (Inactive)
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: