When the following program is compiled using dmd with the "safe" switch set, it produces the error message: "/usr/local/src/phobos/std/c/linux/linux.d(280): Error: cast from int to void* not allowed in safe mode" import std.stdio; void main() { } This bug persists for dmd version 2.023.
In the current version of D2 (version 2.030) the casts that cause safe mode compilation to fail when std.stdio is imported are now to be found in .../druntime/import/core/stdc/signal.d, the following error messages being produced. /usr/local/src/druntime/import/core/stdc/signal.d(25): Error: cast from int to voidC function(int) not allowed in safe mode /usr/local/src/druntime/import/core/stdc/signal.d(26): Error: cast from int to voidC function(int) not allowed in safe mode /usr/local/src/druntime/import/core/stdc/signal.d(27): Error: cast from int to voidC function(int) not allowed in safe mode
Fixed a while ago.