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

empty statements are not treated as statements that need to be reachable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.1.3
    • tools
    • None
    • generic
    • solaris_2.5.1

      Yeah, I know.. pretty picky... But the JLS appears to require statement
      not reachable errors on the following:

      class empty {
          int i;
          int f1() {
              return 1; /* unreachable empty statement -> */ ;
          }
          int f2() {
              while ( false ) /* unreachable empty statement -> */ ;
              return 2;
          }
      }


      If following the JLS spec is important, this should be fixed... Unfortunately
      there are 3 JCK positive lang testcases that have these kind of errors
      in them. See bug 4090844.

      It appears that declaration statements (without initializers) are already
      given the full statement treatment in that if you replace the above
      empty statements with "int k;", you WILL get errors.

      This was originally found to be a JLS issue by the Modena testbase.

      -kto

      kelly.ohair@Eng 1997-11-05

            dstoutamsunw David Stoutamire (Inactive)
            ohair Kelly Ohair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: