Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
60 lines (45 sloc) 1.31 KB
$(SPEC_S The Memory Safe D Spec,
$(P $(I Memory Safety) for a program is defined as it being
impossible for the program to corrupt memory.
Therefore, the Safe D consists only of programming language
features that are guaranteed to never result in memory
$(P Safe D is enabled on a per-module basis by compiling with
the $(B -safe) compiler switch.
<h3>Proscribed Forms</h3>
$(LI $(LINK2 iasm.html, Inline assembler).
$(LI Casting away const or immutable attributes.
$(LI Casting away shared attributes.
$(LI Casting from one pointer type to another pointer type,
except for:
$(LI casting to $(CODE void*) is allowed)
$(LI casting from a pointer to an arithmetic type to
a pointer to another arithmetic type of the same or
smaller size is allowed)
$(LI Casting from a non-pointer type to a pointer type.
$(P A safe module can import and use the public interface of
a system module.
$(P Safe D does not imply that code is portable, uses only
sound programming practices, is free of byte order dependencies,
or other bugs. It is focussed only on eliminating memory corruption
Something went wrong with that request. Please try again.