mirror of
https://github.com/dlang/dmd.git
synced 2025-04-25 20:50:41 +03:00
Merge stable (#21048)
* bump VERSION to v2.110.0 * purge changelog * bump VERSION to v2.111.0-beta.1 * Accept __rvalue attribute on ref functions; which will force the result to be treated as __rvalue. (#20946) This is essential to implement `move`, `forward`, etc. * memoryerror.d: Fix AnySupported version condition (#20983) * Fix #20982 - wrong line number in iasmgcc (#20993) * Move genCfunc to cxxfrontend (#20992) * druntime: Fix compilation of rt.cover on Android (#21015) * Expose SourceLoc to C++ interface (#20980) * [stable] C++ header fixes for declaration, expression, and typinf (#21016) Seen either from compilation errors or missing symbols at link time. * C++ headers: Add 3 Declaration bitfield setters/getters required by LDC * druntime: Add module declaration to rt.invariant, to prevent conflicts with user-provided invariant.d (#21017) * Fix #21020 - Indexing a *cast* AA yields no lvalue anymore (#21029) * Add C++23 to CppStdRevision enum (#21043) * Improve UFCS/property error message (#21046) --------- Co-authored-by: Manu Evans <turkeyman@gmail.com> Co-authored-by: Martin Kinkelin <kinke@users.noreply.github.com> Co-authored-by: Iain Buclaw <ibuclaw@gdcproject.org> Co-authored-by: Martin Kinkelin <noone@nowhere.com>
This commit is contained in:
parent
803a44a347
commit
d5db322fce
32 changed files with 160 additions and 92 deletions
|
@ -1,15 +0,0 @@
|
|||
Copying from `const(void)[]` to `void[]` is disallowed with `-preview=fixImmutableConv`
|
||||
|
||||
If `const(void)[]` data contains tail `const` pointers, copying to `void[]`
|
||||
can subsequently violate `const` data:
|
||||
---
|
||||
void f(int*[] a, const int*[] b)
|
||||
{
|
||||
void[] va = a;
|
||||
const void[] vb = b;
|
||||
va[] = vb[]; // fills `a` with pointers to const
|
||||
*a[0] = 0; // const data mutated
|
||||
}
|
||||
---
|
||||
Copying `vb` data to `va` is no longer allowed with the
|
||||
`-preview=fixImmutableConv` switch.
|
4
changelog/dmd.extern-std-cpp23.dd
Normal file
4
changelog/dmd.extern-std-cpp23.dd
Normal file
|
@ -0,0 +1,4 @@
|
|||
The compiler now accepts `-extern-std=c++23`
|
||||
|
||||
The compiler now accepts c++23 as a supported standard for `-extern-std=`.
|
||||
Currently this only changes the value of `__traits(getTargetInfo, "cppStd")`.
|
|
@ -1,12 +0,0 @@
|
|||
Import expressions are now treated as hex strings
|
||||
|
||||
While [Import expressions](https://dlang.org/spec/expression.html#import_expressions) are typed as `string`, they are also used to embed binary files.
|
||||
By treating them the same as [hex strings](https://dlang.org/spec/lex.html#hex_strings), they implicitly convert to arrays of integral types.
|
||||
|
||||
---
|
||||
// Formerly, a cast was required:
|
||||
immutable ubyte[] iconImg = cast(immutable ubyte[]) import("icon.png");
|
||||
|
||||
// Now, it implicitly converts to integral arrays:
|
||||
immutable ubyte[] iconImg = import("icon.png");
|
||||
---
|
|
@ -1,5 +0,0 @@
|
|||
New trait `isCOMClass` to detect if a type is a COM class
|
||||
|
||||
A Component Object Model (COM) class inherits from a possibly user-defined interface named ``IUnknown``.
|
||||
To detect this during compilation, use the trait ``__traits(isCOMClass, Type)``.
|
||||
During runtime, use the ``TypeInfo_Class`` flag.
|
|
@ -1,15 +0,0 @@
|
|||
For type `bool`, values other than 0 or 1 are not `@safe`
|
||||
|
||||
The spec [was updated](https://dlang.org/spec/type.html#bool)
|
||||
(for 2.109) so that only 0 and 1 are
|
||||
[safe values](https://dlang.org/spec/function.html#safe-values)
|
||||
for `bool`. This means that reading a `bool` value whose underlying byte representation
|
||||
has other bits set is implementation-defined and should be avoided.
|
||||
Consequently the following are deprecated in `@safe` code:
|
||||
|
||||
* initialization of `bool` variables with `= void` (since 2.109)
|
||||
* Reading a `bool` field from a union (since 2.109)
|
||||
* Runtime casting a dynamic array to a `bool` dynamic array type
|
||||
* Runtime casting a `bool` dynamic array to a tail mutable dynamic array type
|
||||
* Casting a pointer to a `bool` pointer type
|
||||
* Casting a `bool` pointer to a tail mutable pointer type
|
Loading…
Add table
Add a link
Reference in a new issue