D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5825 - write is calling a deprecated function
Summary: write is calling a deprecated function
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: patch
: 5772 (view as issue list)
Depends on:
Blocks:
 
Reported: 2011-04-09 11:10 UTC by Andrej Mitrovic
Modified: 2011-09-07 22:42 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrej Mitrovic 2011-04-09 11:10:50 UTC
import std.stdio;
void main()
{   
    typedef void* HANDLE;
    HANDLE hnd;
    write(hnd);
}

D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\format.d(1599): Error: function std.format.formatValue!(LockingTextWriter,HANDLE,immutable(char)).formatValue is deprecated
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\format.d(308): Error: template instance std.format.formatGeneric!(LockingTextWriter,HANDLE,immutable(char)) error instantiating
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(660):        instantiated from here: formattedWrite!(LockingTextWriter,immutable(char),HANDLE)
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(1433):        instantiated
from here: write!(HANDLE)
test2.d(6):        instantiated from here: write!(HANDLE)

This will compile with the -d switch.
Comment 1 yebblies 2011-08-29 01:37:09 UTC
*** Issue 5772 has been marked as a duplicate of this issue. ***