www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1819] New: spurious warning about missing return statement after synchronized

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1819

           Summary: spurious warning about missing return statement after
                    synchronized
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: andrei metalanguage.com


In std.thread, the following code can't compile with warnings:

    static Thread[] getAll()
    {
        synchronized (Thread.classinfo) return allThreads[0 .. allThreadsDim];
    }

The compiler complains that there is no return at the end of the function. This
warning should be removed because all paths inside synchronized do return.


-- 
Feb 07 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1819


bugzilla digitalmars.com changed:

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





Fixed dmd 1.028 and 2.012


-- 
Mar 06 2008