Bug 6644 – std.stdio write/writef(ln) are not @trusted

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2011-09-11T09:49:00Z
Last change time
2014-07-30T17:05:46Z
Keywords
pull, safe
Assigned to
rbanderton
Creator
dmitry.olsh

Comments

Comment #0 by dmitry.olsh — 2011-09-11T09:49:00Z
Surely @safe code should be able to write/read data via File. Test case: import std.stdio; @safe void f() { writeln("Hello!"); } dmd output: Error: safe function 'f' cannot call system function 'writeln' This is on dmd 2.055 release.
Comment #1 by dfj1esp02 — 2014-06-04T13:59:21Z
writeln will call toString on arguments, which may not be trusted.
Comment #2 by rbanderton — 2014-06-06T14:40:47Z
Comment #3 by rbanderton — 2014-06-06T21:21:08Z
Comment #4 by github-bugzilla — 2014-07-30T17:05:45Z
Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/72aa8a9dca85fb03fdaaea74f1ca3303171caaeb Merge pull request #2233 from rbanderton/fix-writeln-inference Fix Issue 6644 - std.stdio write/writef(ln) are not @trusted