[Issue 7566] compiler works incorrectly when debug{} statements are present, ver 2.057

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 23 07:46:32 PST 2012


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



--- Comment #1 from Timofei Bolshakov <tbolsh at gmail.com> 2012-02-23 07:46:31 PST ---
If debug statements are removed - compiler behave as expected:

$ more d_compiler_bug_around_debug.d
#!/usr/bin/rdmd -debug
import std.stdio;

void main(){
bool dummy_flag = false;
    if( dummy_flag )
        writeln("debug print 1"); 
                writeln( "Some real action ..." );
        writeln("debug print 2"); 
        else{
        writeln( "Some other action ");
     }
}
$ ./d_compiler_bug_around_debug.d
./d_compiler_bug_around_debug.d(10): found 'else' instead of statement
./d_compiler_bug_around_debug.d(13): unrecognized declaration
Failed: dmd -debug -v -o- './d_compiler_bug_around_debug.d' -I'.'
>./d_compiler_bug_around_debug.d.deps

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


More information about the Digitalmars-d-bugs mailing list