Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4083890

Empty statements are not marked as unreachable

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      merlin
    • CPU:
      generic
    • OS:
      generic, solaris_2.5.1, solaris_2.6
    • Verification:
      Verified

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: