compile-time constants not used correctly for 'unreachable

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 1.1
    • Component/s: tools
    • None
    • x86
    • windows_95



      Name: mc57594 Date: 02/21/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
      }
      }

      I haven't checked the use of compile-time constants in other
      contexts, i.e. I don't know whether the fault lies with the determination
      of compile-time constants or the algorithm for diagnosing unreachable
      statements.
      ======================================================================

            Assignee:
            David Stoutamire (Inactive)
            Reporter:
            Mark Chamness (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: