http://d.puremagic.com/issues/show_bug.cgi?id=10522

           Summary: __FILE__ and other special keywords cannot be used
                    with printf
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2013-07-01 
15:00:08 PDT ---
-----
import std.stdio;

void main()
{
    printf("-- %s\n", __FILE__);
    printf("-- %s\n", __FUNCTION__);
    printf("-- %s\n", __PRETTY_FUNCTION__);
}
-----

> object.Error: Access Violation

The use-case are printf statements in destructors, which unlike writef will
avoid any allocations (which typically fail in dtors due to the GC being
stopped).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to