Change Log: 2.101.0
Download D 2.101.0
released Nov 14, 2022
Compiler changes
- Add bit fields to D
- Added __traits(classInstanceAlignment)
- Relaxed pragma(crt_constructor) / pragma(crt_destructor) linkage check
- Add predefined version D_Optimized when compiling with -O
- Throwing from contracts of nothrow functions has been deprecated
- Using integers for version or debug conditions has been deprecated
- Print deprecations for scope pointer errors
- Improvements for the C++ header generation
- -preview=fixImmutableConv has been added
- Returning a discarded void value from a function is now deprecated
- ImportC now recognizes the typeof(...) operator
- Removed the -transition=markdown and -revert=markdown switches
- new can now allocate an associative array
- -preview=in can now be used with extern(C++), disabled for other non-D linkage
- The shortened method syntax is now available by default.
- Source files may no longer contain Unicode directionality overrides
- Windows: Double DMD stack limit to 16 MB
Runtime changes
Library changes
- Added SafeRefCounted, that can be used in @safe with -preview=dip1000.
- Move logger out of experimental.
- remove std.experimental.logger's capability to set the minimal LogLevel at compile time
- Change std.experimental.logger.core.sharedLog to return shared(Logger)
- std.experimental.typecons has been removed
- std.digest.digest has been removed
- std.xml has been removed
- std.socket.Socket methods now accept only scope arrays.
- Add custom fill value to std.outbuffer.OutBuffer class
Dub changes
- Building the special test runner configuration
- Output will now be colorized
- dub will now warn on unrecognized fields in dub.json, settings, or selections file
- The two new build types cov-ctfe and unittest-cov-ctfe have been added.
- DUB settings & packages directory placement overhauled
- DUB command exit codes have been made more consistent
- 'install' and 'uninstall' commands have been removed
- When copyFiles is used to copy read-only files, it now makes the copy writable.
- The override system is deprecated
- The shortcut syntax for "dub run" is now also available for sub packages.
- Upgrading all sub packages at once
List of all bug fixes and enhancements in D 2.101.0.
Compiler changes
- Add bit fields to D
They work just like the bit fields in ImportC do.
https://github.com/dlang/dlang.org/pull/3190
struct B { int x:3, y:2; } static assert(B.sizeof == 4); int vaporator(B b) { b.x = 4; b.y = 2; return b.x + b.y; // returns 6 }
- Added __traits(classInstanceAlignment)
To complement __traits(classInstanceSize), providing the required alignment for manual buffers etc.:
align(__traits(classInstanceAlignment, C)) void[__traits(classInstanceSize, C)] buffer;
- Relaxed pragma(crt_constructor) / pragma(crt_destructor) linkage check
extern(C) isn't a requirement for CRT con/destructors anymore when using the default void () signature.
- Add predefined version D_Optimized when compiling with -O
It allows code to distinguish whether it's being compiled with optimizations enabled (the -O flag was provided). This is orthogonal to whether -release mode is active - for that see the predefined versions assert, D_NoBoundsChecks, D_Invariants, etc.
- Throwing from contracts of nothrow functions has been deprecated
Up until now, the compiler accepted in and out contracts of nothrow functions to throw exceptions and call throwing functions. As this breaks nothrow guarantees, a deprecation notice is now triggered.
// deprecated: float sqrt(float n) nothrow in { if (n < 0) throw new Exception("n must be positive"); } do { // ... } // fix: remove nothrow attribute or use assertions float sqrt(float n) nothrow in { assert(n >= 0); } do { // ... }
- Using integers for version or debug conditions has been deprecated
The problem is that it only provides a single number namespace without any meaning. It's better to use version identifiers describing the feature they enable. See also this thread on the forum.
// now deprecated: version = 3; version (2) { } debug = 4; debug (5) { } // use identifiers instead: version = HasX; version (HasX) void x() { /* ... */ } else void x() {}
- Print deprecations for scope pointer errors
The scope attribute has existed for a long time, but the compiler would only verify its semantics when the -preview=dip1000 switch was passed, to avoid breaking code. Pointers or references stored in a scope variable are not allowed to escape the scope in which the variable is defined.
Usually, it is not necessary to mark variables scope, since the Garbage Collector (GC) takes care of freeing memory. However, D allows creating pointers / slices that point to local variables, which use Stack-based memory allocation and are destructed at the end of their scope. It is important that in @safe code, creating such pointers is either disallowed, or has scope semantics enforced, but the compiler would formerly fail to do that:
@safe: int[] getSlice() { int[4] stackBuffer; int[] slice = stackBuffer[]; // slice points to local variable allocated on stack return slice; // dangling pointer! } struct S { int x; int* get() { int* y = &this.x; // this struct instance could be a local variable return y; // dangerous! } }
Starting with this release, scope semantics are enforced in @safe code on pointers to stack memory, but only as deprecation warnings. Eventually, they will be turned into errors. To turn them into errors immediately, use -preview=dip1000. To disable the deprecations, use -revert=dip1000.
Note that the original DIP1000 text is outdated, so please refer to the specification pages for documentation:
- Improvements for the C++ header generation
The following features/bugfixes/improvements were implemented for the experimental C++ header generator:
- Overriding virtual functions are now marked with the override keyword when generating C++11 compatible headers.
- Final virtual functions are now marked with the final keyword when generating C++11 compatible headers.
Note: The header generator is still considered experimental, so please submit any bugs encountered to the bug tracker.
- -preview=fixImmutableConv has been added
The compiler allows implicitly converting a return value with indirections to immutable if it determines the result is unique. Formerly, this check would inspect the types of the indirections, and forget to take into account conversions, such as int[] to void[]:
int[] f(ref void[] m) pure { auto result = new int[5]; m = result; return result; } void main() { void[] v; immutable x = f(v); // `v` is now a mutable alias to immutable variable `x` }
This was filed as issue 15660, which has been fixed some time ago by making the check more strict: the called function must be strongly pure. However, to avoid breaking code, the fix was only active with the -preview=dip1000 switch. Since it is unrelated to dip1000 (which is about scope pointers), the fix has been moved to a new -preview=fixImmutableConv switch.
- Returning a discarded void value from a function is now deprecated
An expression statement of type void that has no side effects should be discarded since it has no effect. The compiler, generally, does not allow such statements, however, in the case of return statements this error is circumvented. For example:
struct StackBuffer { auto opIndex(size_t i) { return arr[i]; } private: void[] arr; }
Although this code compiles, any call to opIndex is going to result in an error because the return type must either be stored somewhere (and variables cannot be of type void) or the call will have no effect.
Starting with this release, returning a discarded void value from a function is deprecated. Such code can be deleted as it most certainly is dead code.
- ImportC now recognizes the typeof(...) operator
ISO C does not specify a typeof operator, but it is a widely-implemented vendor extension. ImportC now implements this extension as well.
Only the form typeof(...) is recognized, other compilers also support (or only support one of) __typeof__(...) and __typeof(...). Imported C using these forms will need to be normalized with #defines.
- Removed the -transition=markdown and -revert=markdown switches
This release removes the -transition=markdown, which prints markdown substitutions made when processing markdown in ddoc documentation blocks, and -revert=markdown switches which disables markdown substitutions in ddoc documentation blocks.
Markdown substitutions have been the default for some time now, and as of this release is always performed.
- new can now allocate an associative array
This allows two associative array references to point to the same associative array instance before any keys have been inserted.
int[string] a = new int[string]; auto b = a; ... a["seven"] = 7; assert(b["seven"] == 7);
Note: Calling new is not needed before inserting keys on a null associative array reference - the instance will be allocated if it doesn't exist.
- -preview=in can now be used with extern(C++), disabled for other non-D linkage
The intent of -preview=in is to make in the go-to storage class for input parameters in D. However, it is D centric, as it is an enhanced version of scope const ref. As non-extern(D) functions usually are expected to match a specific ABI, using in is hardly a good idea.
As C++ also has a "go to" storage class for input parameters (const T&), in can also be applied on extern(C++) function in order to bind to const T& parameters. This also allows to expose a closer API for a function than via const ref, as in will allow to bind rvalues to const T&, as in C++.
- The shortened method syntax is now available by default.
DIP 1043---Shortened Method Syntax has been accepted, the flag -preview=shortenedMethods is no longer required to write shortened function bodies:
int add(int x, int y) pure => x + y; // equivalent full function body: int add(int x, int y) pure { return x + y; }
The preview flag will still work until it is deprecated in a future release.
- Source files may no longer contain Unicode directionality overrides
Trojan Source: Invisible Vulnerabilities shows how they can be used to maliciously hide code in various programming languages. D is also affected.
To prevent this, the compiler now raises an error when they appear in source files. If you need a string literal containing directionality overrides, use escape sequences instead:
string s = "\u202E\u2066";
- Windows: Double DMD stack limit to 16 MB
The compilation of some projects require more stack space than previously available. Now DMD has the same limit as LDC, which increased its stack limit in its 1.29.0 release.
Runtime changes
- Added avx512f detection to core.cpuid
The feature flag core.cpuid.avx512f has been added to allow detection at run-time CPUs with 512-bit vector support.
- --DRT-oncycle=deprecate is removed
The option was introduced in 2.072.2 to help transition code that relied on the old faulty cycle checker for module constructors. It now prints a warning and does the same as the default, --DRT-oncycle=abort. See also: Order of Static Construction in the specification.
- Posix (excl. Darwin): Switch default GC signals from SIGUSR1/2 to SIGRTMIN/SIGRTMIN+1
As the SIGUSR ones might be used by 'system' libraries (e.g., Android Dalvik VM or LLVM libFuzzer), while the SIGRT ones are reserved for user-defined purposes and less likely to collide.
The used signals can still be customized with an early call to core.thread.osthread.thread_setGCSignals().
Library changes
- Added SafeRefCounted, that can be used in @safe with -preview=dip1000.
RefCounted is only available for @system code, because of the possibility of escaping a reference to its payload past the end of its lifetime. a modified copy of it, std.typecons.SafeRefCounted has been added. Also added is a borrow function, that lets one safely access and modify the payload. -preview=dip1000 prevents escaping a reference to it in @safe code.
@safe pure nothrow void fun() { import std.typecons; auto rcInt = safeRefCounted(5); assert(rcInt.borrow!(theInt => theInt) == 5); auto sameInt = rcInt; assert(sameInt.borrow!"a" == 5); // using `ref` in the function auto arr = [0, 1, 2, 3, 4, 5, 6]; sameInt.borrow!(ref (x) => arr[x]) = 10; assert(arr == [0, 1, 2, 3, 4, 10, 6]); // modifying the payload via an alias sameInt.borrow!"a*=2"; assert(rcInt.borrow!"a" == 10); }
Direct access to the payload unfortunately has to be @system, though. While -dip1000 could prevent escaping the reference, it is possible to destroy the last reference before the end of it's scope:
int destroyFirstAndUseLater() { import std.typecons; auto rc = SafeRefCounted!int(123); int* ptr = &rc.refCountedPayload(); destroy(rc); return *ptr; // Reads from freed memory. Don't do this. }
As a side effect, this enabled us to make std.file.dirEntries @safe with -preview=dip1000.
Some member functions of RefCounted that are @safe are not so in SafeRefCounted. The RefCounted type and refCounted function are still available for the old behaviour. However, their main purpose is backwards compatibility. They are not recommended for new code.
- Move logger out of experimental.
The std.experimental.logger package is now std.logger. The old package and modules are still available and publicly import the new ones. To avoid breakage in modules that compile with deprecations as errors, for now the old modules aren't deprecated, but they will be.
- remove std.experimental.logger's capability to set the minimal LogLevel at compile time
Before this change std.experimental.logger had the capability to disable logging at compile time. It was also possible to set the minimal LogLevel at compile time. The trade-off between gained capability, added complexity, and error-proneness was too heavily tilted towards the second two items. This change removes these compile time features.
- Change std.experimental.logger.core.sharedLog to return shared(Logger)
To make unsafe code more explicit std.experimental.logger.sharedLog now returns a shared(Logger) instead of a Logger.
- std.experimental.typecons has been removed
This was an attempt to update std.typecons.wrap with an implementation that could work with struct, but it did not go anywhere. See this post on the forum.
- std.digest.digest has been removed
This module was initially deprecated in 2.076.1, and has been empty since 2.092.0 when all deprecated symbols were removed in favour of importing std.digest or its submodules instead.
- std.xml has been removed
This module is considered out-dated and not up to Phobos' current standards. If you still need it, go to https://github.com/DigitalMars/undeaD
- std.socket.Socket methods now accept only scope arrays.
To comply with dip1000, std.socket.Socket methods now all have scope attributes applied to any slice parameters. This includes receive and send flavors, and also setOption. While not technically a breaking change for users of Socket, if you derive from it, you must apply those attributes to your derivatives or it will fail to compile. However, applying the attributes is backwards compatible with previous versions of Phobos, so there is no need for a migration path.
- Add custom fill value to std.outbuffer.OutBuffer class
Extend the fill, alignSize, align{2,4} methods of std.outbuffer.OutBuffer to specify value to write when filling (up to an alignment).
For flash device images it is desirable to use 0xff as the fill value, because 0xff is the value of the unprogrammed flash memory cell. Padding with 0 requires to programm the flash cell from 0xff to 0x00, which increases wear and tear on the flash memory device. Usually there is some larger block at the end if the flash memory image, which must be padded up to the size of the flash device (usually a power of two). Instead of padding with 0x00 the PR allows to fill with 0xff instead.
There might be also some other use-cases, where it might be reasonable to fill the alignment gaps with some other value than 0x00, e.g. when debugging and viewing output data in a hex editor. It is easier to spot gaps, when the padded spaces contain a custom value like 0x55 or 0xaa.
A new fill method was added, which allows filling with a user-defined value instead of the 0 as in the previous implementation.
OutBuffer buf = new OutBuffer(); buff.fill( 1234, 42 ); // Fills 1234 bytes with 42 starting at buf.offset buff.fill( 10 ); // Same as fill0( 10 );
The alignSize, align{2,4} methods were modified to use some user-defined value for padding to the requested alignment boundary.
OutBuffer buf = new OutBuffer(); buf.write(cast(ubyte) 1); buf.align2(0x55); assert(buf.toBytes() == "\x01\x55"); buf.write(cast(ubyte) 2); buf.align4(0x55); assert(buf.toBytes() == "\x01\x55\x02\x55"); buf.write(cast(ubyte) 3); buf.alignSize(8, 0x55); assert(buf.toBytes() == "\x01\x55\x02\x55\x03\x55\x55\x55");
Dub changes
- Building the special test runner configuration
dub build --config=unittest --build=unittest[-cov] can now be used to mimic building the test runner executable of dub test [--coverage]. Note that this doesn't require an existing unittest configuration.
dub describe --config=unittest allows to derive the path to the executable.
- Output will now be colorized
Dub output has been improved to be more human readable, which means the most important informations in the output will now be colorized / bold.
As is usual with CLI tools, this behavior is automatically turned on whether the output is a TTY. To force the old output in the presence of a TTY, use --color=off. To force colored output in the absence of a TTY, use --color=on.
The --color flag, if set to on or off, is automatically forwarded to the compiler. This is especially useful for CI pipelines to ensure human-readable output.
- dub will now warn on unrecognized fields in dub.json, settings, or selections file
Previously, dub was silently accepting anything it didn't recognize in dub.json, [dub.]settings.json and dub.selections.json. While the original intent was to make forward-compatibility easy, it proved detrimental as typos would just mean the user setting was ignored.
From this release, dub will now warn about any entry in its configuration files or in dub.selections.json. After 10 releases, those warnings will turn into errors.
- The two new build types cov-ctfe and unittest-cov-ctfe have been added.
These extend the existing build types cov and unittest-cov respectively by appending -cov=ctfe to the set of flags passed to the compiler.
- DUB settings & packages directory placement overhauled
You can now configure where DUB places its downloaded packages and where the user configuration is stored through environment variables or through the dub configuration. You need to use an environment variable or the system-wide dub configuration to specify where the user configuration is stored.
By default DUB stores the packages on
- Windows: %APPDATA%/dub/settings.json + %LOCALAPPDATA%/dub/packages/
- Posix: $HOME/.dub/{packages/,settings.json}
now if the DUB_HOME environment variable is set it instead stores the packages (and other config) in
- $DUB_HOME/{packages/,settings.json}
alternatively if DUB_HOME isn't set, but DPATH is set, the following path is used:
- $DPATH/dub/{packages/,settings.json}
The DPATH environment variable is intended to be used by all D tooling related things doing user-space installation of things. It can be used to avoid cluttering the home folder.
Additionally to environment variables it is possible to configure the package placement path + settings.json path through DUB's settings.json file. To configure where the user-editable settings.json is placed you need to adjust the system-wide dub configuration.
In the settings.json you can set the following fields:
{ "dubHome": "/path/to/dub", // sets both package store and config location }
Additionally, these config paths will have environment variables using the $VARIABLE syntax resolved.
The following list describes which path is going to be picked, from top to bottom, stopping whenever one is found:
- $DUB_HOME environment variable
- $DPATH environment variable
- system-wide settings.json: "dubHome" property (only for userSettings)
- most specific settings.json: "dubHome" property (only for localRepository)
- DUB command exit codes have been made more consistent
Some dub commands have been adjusted to return exit code 2 instead of exit code 1. Exit code 1 is now always used for usage errors, while exit code 2 is the more generic any error occurred or package failed to load.
The following commands are affected:
- dub clean
- dub add
- dub search
- dub convert
- 'install' and 'uninstall' commands have been removed
Those commands were long-deprecated aliases to fetch and remove, respectively, and usage of them triggered a warning. They are no longer listed as command in help and dub will no longer recognize them.
- When copyFiles is used to copy read-only files, it now makes the copy writable.
Previously, if the target file would already exist due to a prior run of Dub, copyFiles would produce an access denied error because the read-only target could not be overwritten. Note that if you were affected by this behaviour, you will need to remove those files by hand once to eliminate these errors.
It is common for version control systems to mark binary files read-only in the working copy, to prevent concurrent edits of files in unmergeable formats.
- The override system is deprecated
Dub had an "override" system, allowing a specific version or version range to be overriden by a specific package. This override system was developed with a purely version-based approach in mind, however since its inception, more ways to specify dependencies have been added, making the override approach redundant and less flexible than other approaches. From this release, dub will warn you if it finds an override file, or when using the dub add-override / dub remove-override commands.
- The shortcut syntax for "dub run" is now also available for sub packages.
Invoking dub as "dub :subpackage" is now equivalent to "dub run :subpackage", analogous to just "dub" being equivalent to "dub run".
- Upgrading all sub packages at once
A new "-s" switch allows to "dub upgrade" all sub packages together with the base package. This aims to provide a better workflow for fully reproducible builds and tests.
List of all bug fixes and enhancements in D 2.101.0:
DMD Compiler regression fixes
- Bugzilla 20809: return statement might access memory from destructed temporary
- Bugzilla 21197: Wrong lifetime inference with DIP1000 in dmd 2.093.0
- Bugzilla 23019: Missing filename when -of points to an existing directory
- Bugzilla 23076: SIMD assert fail with -inline -O converting float to short
- Bugzilla 23247: Deprecation: argument 0.0L for format specification "%La" must be double, not real
- Bugzilla 23271: goto skips declaration of variable bugred.A.test.__appendtmp4
- Bugzilla 23291: Members of arrays of shared classes cannot be compared
- Bugzilla 23337: Wrongly elided postblit/copy ctor for array construction (_d_arrayctor lowering)
- Bugzilla 23386: Segfault on enum member UDA inside template
- Bugzilla 23431: [REG 2.101.0][ICE] Segmentation fault in Dsymbol::toParent() (this=0x0) at dmd/dsymbol.d:561
- Bugzilla 23433: [REG 2.081][ICE] Segmentation fault in dmd.blockexit.checkThrow at at src/dmd/blockexit.d:557
- Bugzilla 23439: [REG 2.098] Error: CTFE internal error: literal 'assert(false, "Accessed expression of type noreturn")'
DMD Compiler bug fixes
- Bugzilla 2: Hook up new dmd command line arguments
- Bugzilla 9161: Linker error on linux if struct has @disabled ~this();
- Bugzilla 13123: Disallow throwing contracts for nothrow functions
- Bugzilla 13732: Regular templates can use "template this", and they allow any type to be passed
- Bugzilla 14694: Functions nested within functions need their body in the generated .di file
- Bugzilla 15525: SEGV running semantic analysis on non-root decl that has errors.
- Bugzilla 16575: [ICE] extern(C++) function with D specific types
- Bugzilla 17764: [scope][DIP1000] Escape checker defeated by composition transformations
- Bugzilla 18973: @disable on const toHash causes unresolved symbol error
- Bugzilla 19178: Static initialization of 2d static arrays in structs produces garbage or doesn't compile sometimes
- Bugzilla 19285: false positive GC inferred
- Bugzilla 20365: Copy constructor not invoked on static arrays of structs but the postblit works
- Bugzilla 20823: [DIP 1000] un-@safe code fails with dip1000
- Bugzilla 21314: ICE on extern(c++) static class variables
- Bugzilla 21416: betterC mode program with C++ interface fails to link
- Bugzilla 21432: [CTFE] Cannot declare enum array in function scope
- Bugzilla 21477: TypeInfo errors in betterC are cryptic
- Bugzilla 21676: [ICE][SIMD] DMD crashing with SIMD + optimizations + inlining
- Bugzilla 21956: ice on foreach over an AA of noreturn
- Bugzilla 22108: DIP1000 parameter mistakenly interpreted as return scope instead of scope
- Bugzilla 22134: Deprecate returning a discarded void value from a function
- Bugzilla 22351: extern(C++) function contravariant in D, but not C++
- Bugzilla 22390: Compiler crash when iterating empty array of bottom types
- Bugzilla 22429: importC: designator-list not supported yet
- Bugzilla 22610: ImportC: 3 extra initializer(s) for struct __tag21
- Bugzilla 22626: Can't use synchronized member functions with -nosharedaccess
- Bugzilla 22652: importC: Braceless initializer of nested struct is rejected.
- Bugzilla 22664: Disassembler mistakes rdtscp for invlpg ECX
- Bugzilla 22674: ImportC: compatible types declared in different translation units are not treated equivalent in D.
- Bugzilla 22680: @safe hole with destructors
- Bugzilla 22706: Bad error on explicit instantiation of function template with auto ref parameter
- Bugzilla 22724: ImportC: VC extension __pragma(pack) is not implemented
- Bugzilla 22784: pragma(printf) applies to nested functions
- Bugzilla 22865: __traits(compiles) affects inferrence of attributes
- Bugzilla 22875: importC: cannot assign const typedef with pointers to non-const one
- Bugzilla 22925: importC: multi-dimensional array is not a static and cannot have static initializer
- Bugzilla 22952: Compiler fails to find package.d modules via -mv map
- Bugzilla 22973: importC: sizeof with array and pointer access gives array type has incomplete element type
- Bugzilla 23006: importC: dmd segfaults on static initializer for multi-dimensional array inside struct
- Bugzilla 23007: importC: dmd segfaults for extra braces in array initializer
- Bugzilla 23009: [CODEGEN][SIMD] SIMD + optimizations + inlining + double
- Bugzilla 23010: mixed in aliaseqs used as type dont initualize
- Bugzilla 23012: importC: asm label to set symbol name not applied from forward declaration
- Bugzilla 23018: importC: syntax error for sizeof with postfix operator on parenthesized expression
- Bugzilla 23022: [dip1000] typesafe variadic parameter should not infer return
- Bugzilla 23027: ImportC: Array of struct is not a static and cannot have static initializer
- Bugzilla 23030: importC: errors using typedef struct after first use as const
- Bugzilla 23037: importC: type with only type-qualifier doesn't work
- Bugzilla 23038: importC: sizeof inside struct has struct members in scope
- Bugzilla 23039: importC: declaration with array length has itself in scope
- Bugzilla 23042: -betterC still includes RTInfo
- Bugzilla 23044: importC: comma expression with function call parsed as declaration
- Bugzilla 23045: importC: casted function type is missing extern(C)
- Bugzilla 23047: [ICE][SIMD] Do not SROA vector types
- Bugzilla 23050: Incorrect disassembly of code with -vasm and 0xBE and 0xBF opcodes
- Bugzilla 23054: importC: struct compound-literal assigned by pointer has wrong storage duration
- Bugzilla 23056: importC: dmd asserts for missing return statement in CTFE function
- Bugzilla 23057: importC: dmd segfault on invalid syntax
- Bugzilla 23063: It is possible to return a noreturn value
- Bugzilla 23068: [betterC] BetterC does not respect -checkaction=halt
- Bugzilla 23073: [dip1000] scope inference from pure doesn't consider self-assignment
- Bugzilla 23088: spurious case of "expression has no effect"
- Bugzilla 23105: __trait(getMember) and mixin() of the same code as a string behave differently
- Bugzilla 23112: code passes @nogc, allocates anyway
- Bugzilla 23123: -vasm wrong result for cmpxchg16b
- Bugzilla 23135: Covariance rules for C++ member functions mismatch D
- Bugzilla 23138: Overrides of member functions of an inherited class ignores attribute "downcast"
- Bugzilla 23159: [betterC] scope(failure) use in betterC gives confusing error
- Bugzilla 23167: inaccurate diagnostic for internal tuple bound violation
- Bugzilla 23168: [DIP1000] return scope wrongly rewritten for structs with no indirections
- Bugzilla 23169: [DIP1000] Mangling does not distinguish return and return scope
- Bugzilla 23173: "Error: signed integer overflow" for compiler generated string of long.min
- Bugzilla 23174: Can't alias tuple when it's part of dot expression following a struct literal
- Bugzilla 23176: -vasm misses immediates for some SSE2 instructions
- Bugzilla 23178: Unknown error using alias to __traits evaluated as expression
- Bugzilla 23192: Can't iterate aggregate fields with static foreach inside a member function
- Bugzilla 23205: Can't declare mixin template inside a function
- Bugzilla 23206: ImportC: __declspec(noreturn) does not compile
- Bugzilla 23207: dmd hangs compiling druntime/src/core/stdc/errno.c
- Bugzilla 23213: ImportC - variable length array does not compile
- Bugzilla 23214: ImportC: typedef with unsigned types does not compile
- Bugzilla 23217: ImportC: extra initializer(s) error for array of structs
- Bugzilla 23222: vcg-ast segfaults on aliases to parent module
- Bugzilla 23223: Aliases to modules print the modules contents into ast dump
- Bugzilla 23224: ImportC: memory model switch is not passed to C preprocessor
- Bugzilla 23225: OpenBSD: cpp invocation cannot find files
- Bugzilla 23230: cannot implicitly convert expression define of type char[7] to char
- Bugzilla 23235: [DIP1000] typesafe variadic parameters should automatically be scope
- Bugzilla 23236: can't initialize a @mustuse member in constructor
- Bugzilla 23241: __traits getMember breaks compilation when hit an alias
- Bugzilla 23249: Deprecation: argument &p for format specification "%m" must be char*, not char**
- Bugzilla 23251: Deprecation: format specifier "%[a-z]" is invalid
- Bugzilla 23252: Deprecation: format specifier "%[]]" is invalid
- Bugzilla 23254: Deprecation: format specifier "%S" and "%C" are invalid
- Bugzilla 23256: must supply -mscrtlib manually when compiling for Windows
- Bugzilla 23262: typesafe variadic function parameter cannot infer return
- Bugzilla 23293: ImportC: _Bool bit fields layout does not match gcc
- Bugzilla 23308: Can't resolve overload of varargs function if one parameter is the result of a ternary expression
- Bugzilla 23327: [ICE] SEGV in AssocArray!(Identifier, Dsymbol).AssocArray.opIndex(const(Identifier)) at src/dmd/root/aav.d:313
- Bugzilla 23331: implicit cast from noreturn crashes compiler in various ways
- Bugzilla 23338: braceless subarray initalizers for struct fields fails
- Bugzilla 23340: std.path: expandTilde erroneously raises onOutOfMemory on failed getpwam_r()
- Bugzilla 23342: ImportC: Array compound literals use the GC
- Bugzilla 23343: ImportC: functions declared with asm label to set symbol name gets extra underscore prepended
- Bugzilla 23345: ImportC: out of order designated initializers initialize to wrong value
- Bugzilla 23346: ImportC: pragma pack is not popped
- Bugzilla 23347: ImportC: pragma pack causes asm label to set symbol name to be ignored
- Bugzilla 23348: not handling braceless sub structs in initializers
- Bugzilla 23351: A bunch of Mayonix's dmd-segfaulting programs
- Bugzilla 23355: invalid template parameter loses error location in some cases
- Bugzilla 23357: ImportC: compatible types with definitions leads to redeclaration error when used from D.
- Bugzilla 23368: Throwing a null exception at compile time crashes the compiler
- Bugzilla 23379: Cast of expressions with type noreturn result in ice
- Bugzilla 23380: [dip1000] class parameter should not be treated as ref qua lifetime
- Bugzilla 23406: [seg fault] enums can cause compile time seg faults with assignments using alias this
- Bugzilla 23461: dmd: src/dmd/backend/cod1.d:2037: Assertion false failed
DMD Compiler enhancements
- Bugzilla 7372: Error provides too little information to diagnose the problem (error: undefined identifier)
- Bugzilla 14690: pragma(inline, true) functions must have their bodies emitted in the .di file
- Bugzilla 16701: Remove Restriction of "package.d" Source File Module Forced to All Lowercase
- Bugzilla 17575: named mixin template error message
- Bugzilla 21243: Allow lambdas to return auto ref
- Bugzilla 21673: [SIMD][Win64] Wrong codegen for _mm_move_ss
- Bugzilla 22911: dtoh: make include directives sorted for generated headers
- Bugzilla 23079: [dip1000] be more lenient when taking address of ref return
- Bugzilla 23141: Improve -release switch description
- Bugzilla 23142: Scope should not apply to unittests
- Bugzilla 23143: ImportC: forward enum declarations need to be supported
- Bugzilla 23165: lambda functions are not inlined
- Bugzilla 23191: [dip1000] scope parameter can be returned in @system code
- Bugzilla 23216: Better Error Message For foreach_reverse Without Bidirectional Range
- Bugzilla 23284: Enhance floating point not representable error message
- Bugzilla 23295: [dip1000] explain why scope inference failed
- Bugzilla 23306: @disable new() ought not disable scope A = new A
- Bugzilla 23369: Confusing error message for duplicate import
- Bugzilla 23376: Allow multi-code-point HTML entities
- Bugzilla 23384: Suggest calling matching base class method when hidden
Phobos regression fixes
- Bugzilla 23245: [REG 2.099] std.format ignores non-const toString method of static array element
- Bugzilla 23246: [REG 2.099] std.format ignores non-const toString method of associative array value
- Bugzilla 23268: clamp no longer accepts shorts
- Bugzilla 23400: [REG 2.099] Can't format enum value whose base type has non-const opEquals
Phobos bug fixes
- Bugzilla 14543: std.algorithm.searching.until does not handle range sentinels nicely
- Bugzilla 16034: map should be possible with a reference only
- Bugzilla 16232: std.experimental.logger.core.sharedLog isn't thread-safe
- Bugzilla 18631: std.random.choice does not work with const arrays
- Bugzilla 22637: std.conv to!double and parse!double dont throw on under/overflow
- Bugzilla 23182: Can't assign struct with opAssign to SumType in CTFE
- Bugzilla 23196: File constructor fails to preallocate oom error, uses exception instead
- Bugzilla 23215: calling std.file.remove with null string segfaults in strlen
- Bugzilla 23250: Unicode regional indicators are not paired correctly
- Bugzilla 23270: std.random.dice is poorly documented
- Bugzilla 23288: zlib: Fix potential buffer overflow
- Bugzilla 23324: Incorrect source link in std.format docs
- Bugzilla 23350: Nondeterministic test failure in std.concurrency
- Bugzilla 23362: Permutations should be a forward range
Phobos enhancements
- Bugzilla 13893: "rawRead must take a non-empty buffer"
- Bugzilla 18735: all versions of find and canfind should identify usage of predicate
- Bugzilla 21000: -preview=nosharedaccess precludes use of stdin,stdout,stderr
- Bugzilla 23101: [std.sumtype] canMatch does not account ref
- Bugzilla 23298: std.string wrap wraps early
- Bugzilla 23333: DList range can be @nogc
- Bugzilla 23370: std.base64 can have more @nogc functions
Druntime bug fixes
- Bugzilla 15939: GC.collect causes deadlock in multi-threaded environment
- Bugzilla 23060: MacOS: core.sys.posix.sys.socket missing some definitions
- Bugzilla 23065: importC: __builtin_expect should use c_long
- Bugzilla 23067: importC: offsetof macro assumes size_t is defined
- Bugzilla 23129: object.destroy doesn't consider initialize=false on D classes
- Bugzilla 23228: OpenBSD: No SIGRTMIN or SIGRTMAX
- Bugzilla 23302: std.algorithm.comparison.predSwitch producing SwitchError with error message as the filename
Druntime enhancements
- Bugzilla 23456: OpenBSD: Add waitid support
dlang.org bug fixes
- Bugzilla 14542: Table of contents in specification PDF is broken
- Bugzilla 15379: "final" attribute on function parameter
- Bugzilla 15476: DDOC_UNDEFINED_MACRO is undocumented
- Bugzilla 17324: Floating point 1/(1/x) > 0 if x > 0 not generally true
- Bugzilla 17514: "positive" -> "nonnegative"
- Bugzilla 17623: Unexpected failure of an assertion on empty strings
- Bugzilla 18496: Complement expressions now actually int promote
- Bugzilla 18855: Behavior of Anonymous Union is Undocumented
- Bugzilla 18887: inout badly described
- Bugzilla 19869: FunctionLiteral allows incorrect forms
- Bugzilla 21188: Anonymous structs - not described
- Bugzilla 21279: cast expression between integer types is not defined
- Bugzilla 21781: [Oh No! Page Not Found] Links to core libs from Better C
- Bugzilla 22237: AA.update is underspecified
- Bugzilla 22835: Undocumented type specializations of is-expression
- Bugzilla 23062: Function/delegate inference example does not compile
- Bugzilla 23194: Add our company to the list of D firms
- Bugzilla 23237: dmd 2.100.1 download link error.
- Bugzilla 23276: DOC: ">" instead of ">" in dmd-windows.html
- Bugzilla 23296: Value Range Propagation not documented
- Bugzilla 23314: Language spec falsely states that struct field invariants are checked
- Bugzilla 23325: Assigning dynamic array to static array not documented
- Bugzilla 23358: Link unusable due to space insertion
dlang.org enhancements
- Bugzilla 15286: is(typeof(symbol))
- Bugzilla 19036: .tupleof order guarantee
- Bugzilla 22141: Property .capacity is not listed in the array properties section
- Bugzilla 23186: wchar/dchar do not have their endianess defined
- Bugzilla 23359: Rename InOut to ParameterStorageClass
Contributors to this release (72)
A huge thanks goes to all the awesome people who made this release possible.
- Adam D. Ruppe
- Adela Vais
- aG0aep6G
- Andrea Fontana
- Andrej Mitrovic
- Ast-x64
- Ate Eskola
- Atila Neves
- Bastiaan Veelo
- Ben Jones
- bistcuite
- Boris Carvajal
- Brian Callahan
- Carsten Schlote
- chloekek
- Dennis
- Dennis Korpel
- dkorpel
- drpriver
- Elias Batek
- Emanuele Torre
- Etienne Brateau
- etienne02
- Grim Maple
- hatf0
- Hiroki Noda
- human
- Iain Buclaw
- ichordev
- Ilya Yaroshenko
- Iulia Dumitru
- james
- Jan Jurzitza
- Jasmine Hegman
- Joe
- João Lourenço
- Lucian Danescu
- lucica28
- Luís Ferreira
- Martin Kinkelin
- Martin Nowak
- Mathias Lang
- Max Haughton
- mhh
- Mike Parker
- MoonlightSentinel
- Nicholas Wilson
- Nick Treleaven
- Paul Backus
- Per Nordlöw
- Petar Kirov
- Quirin F. Schroll
- Rainer Schuetze
- Razvan Nitu
- Robert burner Schadek
- Roy Margalit
- ryuukk
- Sebastiaan Koppe
- Stefan Rohe
- Steven Dwy
- Steven Schveighoffer
- Su
- Teodor Dutu
- the-horo
- TheGag96
- Tim Schendekehl
- tynuk
- vali0901
- Vladimir Panteleev
- Walter Bright
- wolframw
- yori