Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

60 lines (45 sloc) 1.339 kB
Ddoc
$(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
corruption.
)
$(P Safe D is enabled on a per-module basis by compiling with
the $(B -safe) compiler switch.
)
<h3>Proscribed Forms</h3>
$(UL
$(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:
$(UL
$(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.
)
<h3>Limitations</h3>
$(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
possibilities.
)
)
Macros:
TITLE=Memory-Safe-D-Spec
WIKI=SafeDSpec
CATEGORY_SPEC=$0
Jump to Line
Something went wrong with that request. Please try again.