October 09, 2007 [Issue 1559] New: version statement makes code outside of it disappear | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=1559 Summary: version statement makes code outside of it disappear Product: D Version: 1.022 Platform: PC OS/Version: Windows Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: torhu@yahoo.com --- // newbug.d void main() { //int x; // FIX 1 printf("Do you see this?\n"); version(ANYTHING) { /* Doesn't matter if this block is empty or not */ } else { /*printf("Now you do!");*/ } // FIX 2 } -- Compiling and running it: --- c:\prog\test\D\bugs>dmd -run newbug c:\prog\test\D\bugs> --- Nothing is printed, which suggests that the printf call is not compiled in. Grepping the executable for 'printf' turns up empty. Uncommenting the code in either line 'FIX 1' or 'FIX 2' makes the first printf call work. -- |
June 22, 2008 [Issue 1559] version statement makes code outside of it disappear | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1559 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from bugzilla@digitalmars.com 2008-06-22 18:52 ------- Fixed dmd 1.031 and 2.015 -- |
Copyright © 1999-2021 by the D Language Foundation