www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2793] New: Unreachable code in Phobos std.algorithm sort

reply d-bugmail puremagic.com writes:

           Summary: Unreachable code in Phobos std.algorithm sort
           Product: D
           Version: 2.026
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: gide nwawudu.com

The following code does not compile with warnings enabled (-w). Commenting out
src\phobos\std\algorithm.d lines 2119 and 2121 fixes the issue.

import std.algorithm;

void main() {
        int[] a = [1, 2, 3];

C:> dmd -w test.d
warning - C:\D\dmd\windows\bin\..\..\src\phobos\std\algorithm.d(2119): Error:
statement is not reachable
C:\D\dmd\windows\bin\..\..\src\phobos\std\algorithm.d(2504): template instance
error instantiating

Apr 03 2009
parent d-bugmail puremagic.com writes:

gide nwawudu.com changed:

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

------- Comment #1 from gide nwawudu.com  2009-05-02 08:53 -------
Fixed in DMD 2.029.

May 02 2009