On Wednesday, 8 September 2021 at 04:43:31 UTC, Tejas wrote:
On Wednesday, 8 September 2021 at 04:32:50 UTC, james.p.leblanc wrote:
[...]

Yes you are correct (to my understanding)

DMD only respects `align` keyword upto the value 16,ie, until `align(16)`, the code behaves the way you expect it to. It is 100% a bug(don't have the link on me right now)

Try the following code on DMD, then LDC. See for yourself

```d
import std.stdio:writeln;

void main()
{
    align(16) int[100] a;
    align(1024) int[100] b;
    writeln(cast(ulong)&a[0] % 16);
    writeln(cast(ulong)&b[0] % 1024);
}
```

Here's the link:
https://issues.dlang.org/show_bug.cgi?id=16098

Reply via email to