[Issue 22759] ImportC: cannot modify const expression from dereferencing const pointer declared within function.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 6 22:19:23 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=22759

--- Comment #4 from dave287091 at gmail.com ---
Until D adds head const, couldn’t you do a similar fix as for
https://issues.dlang.org/show_bug.cgi?id=22534 ? Just treat declarations of
`int * data` and `int * const data` the same in the body of c functions (as
long as they are not also static).

Neither the status quo nor ignoring const in this case is correct, but this
would allow more correct programs to successfully compile.

--


More information about the Digitalmars-d-bugs mailing list