Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

Change Log: 2.089.0

previous version: 2.088.0

Download D nightlies
To be released

This changelog has been automatically generated from all commits in master since the last release.

  • The full-text messages are assembled from the changelog/ directories of the respective repositories: dmd, druntime, phobos, tools,, installer, and dub.
  • See the DLang-Bot documentation for details on referencing Bugzilla. The DAutoTest PR preview doesn't include the Bugzilla changelog.
  • The pending changelog can be generated locally by setting up and running the pending_changelog target:
    make -f posix.mak pending_changelog

2.089.0 comes with 18 major changes and 47 fixed Bugzilla issues. A huge thanks goes to the 34 contributors who made 2.089.0 possible.

List of all upcoming bug fixes and enhancements in D 2.089.0.

Compiler changes

  1. Deprecate allowing shadowing in foreach loops

    Up until this version it was allowed to shadow a variable in a foreach loop, although it is dissallowed in a normal for loop. This patch makes the behavior of the foreach loop consistent with the for loop one. To fix any issues encountered, rename the variable inside the foreach body that shadows the one from the upper scope.

  2. IsExpressions now correctly match combinations of const, inout, and shared.

    With Bugzilla 20138 fixed, IsExpressions now correctly match combinations of the qualifiers const, inout, and shared.

    Examples that failed previously but pass now:

    static assert(is(shared(const int) U == shared U) && is(U == const int));
    static assert(is(shared(inout int) U == inout U) && is(U == shared int));

    Note that the behavior of code like the following changes:

    static if (is(T U == const U) { ...}
    else static if (is(T U == shared const U)) { ... }

    The second case will never be reached, because the first one now matches when T is shared const. To get the old behavior, switch the order.

  3. New -preview=noXlinker compiler flag to address issue 6952

    On Posix, dmd currently passes -L-prefixed compiler flags through the linker driver (e.g. cc) to the linker (e.g. ld) by prepending them with -Xlinker. Therefore, it is currently not possible to pass flags directly to the linker driver. Some flags affected by this are -static, -nostartfiles, -nodefaultlibs, and -nostdlib to name a few.

    With this release, a new compiler flag, -preview=noXlinker, has been added to remedy the issue. It will prevent the compiler from prepending -Xlinker to any -L-prefixed flags so the user can pass flags direclty to the linker driver. Users who would like to pass -L-prefixed flags through the linker driver to the linker should explicitly prepend them with -L-Xlinker.


    • dmd -L-nostartfiles will invoke the linker driver as cc -Xlinker -nostartfiles which is not
    • dmd -preview=noXlinker -L-nostartfiles will invoke the linker driver as cc -nostartfiles which
    will achieve the desired result.
    • dmd -L-e -Lstart will invoke the linker driver as cc -Xlinker -e -Xlinker start.
    • dmd -preview=noXlinker -L-Xlinker -L-e -L-Xlinker -Lstart will invoke thee linker driver as
    cc -Xlinker -e -Xlinker start.

    It is hoped that -preview=noXlinker will some day become the default. If and when that happens a -revert=noXlinker flag can be added to revert back to the old behavior.

    See also:

Runtime changes

  1. core.atomic : msync has been removed

    It had been deprecated in 2.061 in favor of MemoryOrder.

  2. Added overloads for core.atomic.cas which don't discard their result.

    Existing core.atomic.cas functions discard the result, which make it impossible to implement certain operations. A new set of overloads was added which take ifThis by pointer and write the result back to the argument.

  3. Added core.atomic.atomicExchange.

    Added missing core.atomic.atomicExchange function to the atomic suite.

  4. Added core.atomic.atomicFetchAdd and core.atomic.atomicFetchSub.

    Added core.atomic.atomicFetchAdd and core.atomic.atomicFetchSub to the atomic suite.

  5. Non-POSIX CLOCK enum members have been removed from core.sys.posix.time

    Namely CLOCK_MONOTONIC_RAW, CLOCK_MONOTONIC_COARSE (linux), CLOCK_MONOTONIC_PRECISE, CLOCK_MONOTONIC_FAST (FreeBSD, DragonflyBSD), and CLOCK_MONOTONIC_COARSE (CRuntime_Glibc). Those were deprecated in 2.067. They are available on their respective platform modules.

  6. core.sys.posix.dlfcn : dladdr, dlvsym, Dl_info have been removed

    They are linux extensions, not POSIX, and thus can be found in core.sys.linux.dlfcn. They had been deprecated since 2.063.

  7. core.exception: Remove onHiddenFuncError / HiddenFuncError

    Those have been deprecated since 2.068, and are related to a language feature that is long gone.

  8. core.exception : setAssertHandler has been removed

    It had been deprecated in 2.064 in favor of assertHandler.

  9. core.thread : has been removed

    This had been deprecated since 2.068 in favor of[Yes|No]).

  10. Module core.sys.linux.sys.netinet.tcp has been removed

    This module had been deprecated since 2.077.0. core.sys.linux.netinet.tcp should be imported instead.

  11. core.runtime : Runtime.initialize, Runtime.terminate functions taking ExceptionHandler have been removed

    They were deprecated since 2.065 in favor of rt_init C functions, which allow to initialize the runtime from C code.

  12. Added core.stdcpp.string.

    Added core.stdcpp.string, which links against C++ std::basic_string

    Known issues:

    Currently, the GCC (libstdc++) implementation has a known issue with the modern __cxx11 ABI, because the C++ struct contains an interior pointer which is illegal in D, and incompatible with D move semantics. To use core.stdcpp.string on linux/GCC, you must use the old string ABI by supplying -D_GLIBCXX_USE_CXX11_ABI=0 to g++, and also -version=_GLIBCXX_USE_CXX98_ABI to your D compiler. Work to define D move constructors is ongoing and expected to resolve this issue when it arrives.

  13. Added core.stdcpp.vector.

    Added core.stdcpp.vector, which links against C++ std::vector

Dub changes

  1. Improved support for LDC, incl. cross-compilation

    The ldc2 driver now supports

    • some more command-line options (coverage, profiling, keeping stack frame),
    • separate linking,
    • cross-compilation by specifying the target triple (LDC -mtriple) as --arch, e.g., --arch=x86_64-pc-windows-msvc. Check out for how to setup LDC.

  2. Support for dub global settings file at the root package level

    Dub settings file can now also be added to project root folder and has the highest priority.

List of all bug fixes and enhancements in D 2.089.0:

DMD Compiler regressions

  1. Bugzilla 20126: codegen reloads parameter from register when iasm changed the backing memory
  2. Bugzilla 20212: invalid debug info with enum type in library

DMD Compiler bugs

  1. Bugzilla 982: Codeview: symbols of enum type are declared integer
  2. Bugzilla 1104: CodeView: char is marked 0x20 (T_UCHAR) instead of 0x10 (T_CHAR)
  3. Bugzilla 2195: Variable shadowing in foreach is not detected and reported
  4. Bugzilla 2450: Error using operators from named template mixin
  5. Bugzilla 3831: writeln of a delegate typeid
  6. Bugzilla 4372: type of enumerator values reduced to base type in debug info
  7. Bugzilla 6952: Static Linking on Linux
  8. Bugzilla 13582: Deprecated modules imported from other deprecated modules shouldn't be warned about
  9. Bugzilla 19965: [DIP1000] Template allows to escape internal pointer
  10. Bugzilla 20089: FPU stack not cleaned up properly
  11. Bugzilla 20131: Bad codegen from inline asm LOCK CMPXCHG; possible REX prefix missing
  12. Bugzilla 20138: is expression not evaluating correctly?
  13. Bugzilla 20163: Deprecated import in string mixin does not output diagnostic message
  14. Bugzilla 20164: Importing deprecated module at function-local scope does not output diagnostic message
  15. Bugzilla 20181: [nightly 2019-08-29] internal compiler error when static foreach iterating property method of struct

DMD Compiler enhancements

  1. Bugzilla 809: Should be possible to convert lazy argument to delegate
  2. Bugzilla 1547: Default parameter values should use implicit static opCall
  3. Bugzilla 18272: missing changelog entry and no doc for -gf (besides cryptic emit debug info for all referenced types)
  4. Bugzilla 18617: need __traits(deprecated, expr) to check whether an expression would trigger deprecation

Phobos regressions

  1. Bugzilla 20186: File size of "Hello, world" executable increased by 185KB

Phobos bugs

  1. Bugzilla 17705: std.math.isFinite cannot run at compile-time
  2. Bugzilla 19514: gcd(BigInt(2), BigInt(1)) fails
  3. Bugzilla 20145: Random unittest failures inf std.datetime.stopwatch
  4. Bugzilla 20205: std.math: Wrong result for abs(int.min)
  5. Bugzilla 20218: Checked format string takes infinite time for infinite ranges

Phobos enhancements

  1. Bugzilla 20147: Enable comparison (==, >, >=, <=, <) between std.bigint.BigInt and floating point numbers
  2. Bugzilla 20159: Make std.math.scalbn work in CTFE
  3. Bugzilla 20192: Make std.math.isSubnormal work in CTFE
  4. Bugzilla 20196: Make std.math.isNormal work in CTFE
  5. Bugzilla 20199: Make std.math.frexp work in CTFE
  6. Bugzilla 20200: Make std.math.isPowerOf2 work for floating point numbers in CTFE
  7. Bugzilla 20201: Make std.math.scalbn pure
  8. Bugzilla 20202: Make std.math.signbit work in CTFE
  9. Bugzilla 20203: Make std.math.copysign work in CTFE

Druntime bugs

  1. Bugzilla 13821: fiber + exception + win server 2012 failures
  2. Bugzilla 16380: no bindings for err.h
  3. Bugzilla 18643: Compiling error when combining CAS and numeric literal.
  4. Bugzilla 20155: Allocating a struct with dtor on the GC heap can produce false pointers
  5. Bugzilla 20214: GC: realloc can result in false pointers if address doesn't change

Druntime enhancements

  1. Bugzilla 8831: core.atomic: add compare-and-swap function with other result type
  2. Bugzilla 13826: Move volatileLoad/Store to core.volatile when the volatile keyword is removed
  3. Bugzilla 15007: core.atomic match C++11
  4. Bugzilla 20105: core.atomic 'cas' function is incomplete
  5. Bugzilla 20106: core.atomic : atomicFence doesn't accept MemoryOrder
  6. Bugzilla 20107: core.atomic : Memory order is missing keys

Contributors to this release (34)

A huge thanks goes to all the awesome people who made this release possible.

previous version: 2.088.0