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

compile-time constants not used correctly for 'unreachable statements'

XMLWordPrintable

    • generic, x86
    • generic, windows_95



      Name: mc57594 Date: 02/10/97


      A statement that is correctly diagnosed as unreachable (e.g.
      below) because it follows a while loop (or similar construct) whose boolean
      expression is the literal 'true' is not correctly diagnosed when the
      expression is another constant expression of value true.

      class B {
      {
      do
      ;
      while (true ? true : false); // never terminates
      System.out.println("hello, world!"); // unreachable
      }
      }
      ======================================================================

            wmaddoxsunw William Maddox (Inactive)
            mchamnessunw Mark Chamness (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: