On Saturday, 21 August 2021 at 07:16:46 UTC, Heikuw wrote:
What causes this example of safeD code to be compiled in dmd
and ldc but not compiled in gcc?
Most likely frontend differences. Check `pragma(msg,
__VERSION__);`.
On Saturday, 21 August 2021 at 07:16:46 UTC, Heikuw wrote:
What causes this example of safeD code to be compiled in dmd
and ldc but not compiled in gcc?
The default behavior varies, but the dip1000 behavior is the same:
```
$ gdc -ftransition=dip1000 bug.d
bug.d:26:28: error: scope variable mp
What causes this example of safeD code to be compiled in dmd and
ldc but not compiled in gcc?
code :
immutable(int)* f(int* p) @trusted
{
version (none) p[2] = 13;
// Invalid. p[2] is out of bounds. This line would
exhibit undefined
// behavior.
versio