http://d.puremagic.com/issues/show_bug.cgi?id=6319
Summary: Problem with prinft inside debug{} of pure function Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2011-07-14 17:14:15 PDT --- A D2 program: import core.stdc.stdio; void foo() pure { debug { if(true) printf("********"); } } void main() { foo(); } If I compile it with -debug I DMD 2.054 it shows: test.d(5): Error: pure function 'foo' cannot call impure function 'printf' If I remove the if(true) line the program compiles and runs correctly: import core.stdc.stdio; void foo() pure { debug { printf("********"); } } void main() { foo(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------