[Bug 29] New: undefined behaviour of: scope(...){ return X; }

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 9 13:11:23 PST 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=29

           Summary: undefined behaviour of: scope(...){ return X; }
           Product: D
           Version: 0.149
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: accepts-invalid, EH
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: walter at digitalmars.com
        ReportedBy: thomas-dloop at kuehne.cn


void main(){
        scope(exit){
                return 0; // should fail to compile
        }
}

int main(){
        scope(exit){
                return 0; // undefined behaviour
        }

        return 1;
}

test cases:
http://dstress.kuehne.cn/nocompile/s/scope_08_A.d
http://dstress.kuehne.cn/nocompile/s/scope_08_C.d
http://dstress.kuehne.cn/nocompile/s/scope_08_B.d
http://dstress.kuehne.cn/undefined/scope_08_D.d
http://dstress.kuehne.cn/undefined/scope_08_E.d
http://dstress.kuehne.cn/undefined/scope_08_F.d


-- 




More information about the Digitalmars-d-bugs mailing list