Thread overview
[Issue 1843] New: Unreachable statement warning lacks line number
Feb 16, 2008
d-bugmail
[Issue 1843] Bogus unreachable statement on forward referenced struct, lacks line number
Feb 16, 2008
d-bugmail
Mar 07, 2008
d-bugmail
February 16, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1843

           Summary: Unreachable statement warning lacks line number
           Product: D
           Version: 1.026
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: larsivar@igesund.net


I expect this to be a general problem with this particular warning:

warning - Error: statement is not reachable

In case that isn't enough, the link below shows a file that expose this twice.

http://www.dsource.org/projects/tango/browser/trunk/tango/io/archive/Zip.d?rev=3200


-- 

February 16, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1843


matti.niemenmaa+dbugzilla@iki.fi changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |340
              nThis|                            |
           Severity|normal                      |major
           Keywords|                            |rejects-valid
           Platform|Other                       |All
            Summary|Unreachable statement       |Bogus unreachable statement
                   |warning lacks line number   |on forward referenced
                   |                            |struct, lacks line number




------- Comment #1 from matti.niemenmaa+dbugzilla@iki.fi  2008-02-16 06:49 -------
No, this is actually worse. The warning comes from the following minimal example, and it has to do with forward referencing:

class ZipEntry {
    ZipEntryInfo info;
    this() {}
}
struct ZipEntryInfo {}

Move ZipEntryInfo above ZipEntry and the warnings disappear.


-- 

March 07, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1843


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #2 from bugzilla@digitalmars.com  2008-03-07 00:31 -------
Fixed dmd 1.028 and 2.012


--