Thread overview | |||||
---|---|---|---|---|---|
|
August 06, 2005 Compiler crash - (in)out of wrong type | ||||
---|---|---|---|---|
| ||||
DMD 0.128, Windows XP SP2. -- void asdf(inout int foobar) {} void main() { uint foo; asdf(foo); } -- The types can be anything, as long as they don't match. Also, foobar must be out or inout. Result: Error "cast(int)(foo) is not an lvalue". And the compiler crash, of course: "dmd.exe has encountered a problem", etc. |
August 06, 2005 Re: Compiler crash - (in)out of wrong type | ||||
---|---|---|---|---|
| ||||
Posted in reply to Deewiant | "Deewiant" <deewiant.doesnotlike.spam@gmail.com> wrote in message news:dd23vv$1bgq$1@digitaldaemon.com... > DMD 0.128, Windows XP SP2. > -- > void asdf(inout int foobar) {} > > void main() { > uint foo; > > asdf(foo); > } > -- > The types can be anything, as long as they don't match. Also, foobar must be out or inout. > > Result: > Error "cast(int)(foo) is not an lvalue". > And the compiler crash, of course: "dmd.exe has encountered a problem", > etc. All "invalid lvalue" errors will result in a crash, as Walter has inserted a *cast(void*)0=0 in the function that detects invalid lvalues as a debugging aid, and he never took it out when he released 0.128. It'll be gone next patch (I hope). |
August 06, 2005 Re: Compiler crash - (in)out of wrong type | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley wrote:
> All "invalid lvalue" errors will result in a crash, as Walter has inserted a *cast(void*)0=0 in the function that detects invalid lvalues as a debugging aid, and he never took it out when he released 0.128. It'll be gone next patch (I hope).
>
Ah, thanks. That explains a couple of bugs I've submitted here, and I probably would have submitted more if you hadn't told me this :-)
|
Copyright © 1999-2021 by the D Language Foundation