Note: This website is archived. For up-to-date information about D projects and development, please visit

As of DMD 2.053, patching the compiler is no longer required. The instructions below should be considered obsolete.

Applying the patch

1. If you do not have the patch utility installed:


Get it from

Linux (Debian and derivatives)


sudo apt-get install patch

2. To apply the patch, run the following commands in the console:

cd <dmd-source-dir>
patch -p0 -i <patch-dir>/dmd.<dmd-version>.patch

where <dmd-source-dir> is the path to the dmd source directory (e.g. C:/dmd/dmd2/src/dmd), <patch-dir> is the path to the directory where the patch is located and <dmd-version> is the dmd version the patch was created against (e.g. 2.046)

Compiling the patched dmd

1. In the dmd source directory, run:


make -f win32.mak release


make -f linux.mak

2. Replace the old dmd binary with the new one, which has been created in the source directory.