-betterC not working

SrMordred via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Aug 30 15:18:07 PDT 2017


On Ubuntu:

//dub.json
{
    "name": "d_betterc",
    "dflags" : ["-betterC"]
}

//source/app.d
import std.stdio;
extern (C) int main(int argc, char** argv) {
     int[] x;
     writeln(x);
     return 0;
}

//cmd
dub run --config=application --arch=x86_64 --build=debug 
--compiler=dmd
//or
dmd -betterC source/app.d app.d


Both compiles and run. But it shouldnt.
What im doing wrong?

(I got another type of errors on windows, but can't replicate it 
right now)

DMD64 D Compiler v2.075.1
DUB version 1.4.1, built on Aug 10 2017




More information about the Digitalmars-d-learn mailing list