By default, D has no safeguards to prevent you from doing memory-unsafe things, and afaik no compile-time checks short of marking your main method as @safe. However, because the language is by default memory managed, it is fairly easy to stick to safe code without this by avoiding pointer/cast voodoo.