```D
-- app.d
enum Test {A, B, C}
Test test = Test.A;
extern(C) void main()
{
switch(test)
{
default:
break;
}
}
```
```
-- object.d
// empty for now
```
`dmd -m64 app.d && ./app.exe` compiles, running it segfault ⛔
`ldc2 -m64 app.d && ./app.exe` compiles, running it works ✅
Now the interesting part
`dmd -g -m64 app.d && ./app.exe` compiles, running it works! ✅
What `-g` does that makes this code compile and work with DMD?
Code compiles and run fine with LDC but segfault with DMD
ryuukk_ via Digitalmars-d-learn Mon, 29 Aug 2022 14:51:55 -0700
The following code compiles and run fine with LDC, but with DMD
it compiles and then default at runtime
- Code compiles and run fine with LDC but se... ryuukk_ via Digitalmars-d-learn
- Re: Code compiles and run fine with L... ryuukk_ via Digitalmars-d-learn
- Re: Code compiles and run fine with L... zjh via Digitalmars-d-learn
- Re: Code compiles and run fine with L... wjoe via Digitalmars-d-learn
- Re: Code compiles and run fine wi... ryuukk_ via Digitalmars-d-learn
- Re: Code compiles and run fine with L... ryuukk_ via Digitalmars-d-learn
