```
void main() {
auto foo = (ushort*).init - (ubyte*).init;
}
```
As of DMD 2.105.0, this code prints a deprecation and an error:
```
test.d(2): Deprecation: cannot subtract pointers to different types: `ushort*` and `ubyte*`.
test.d(2): Error: incompatible types for ((null) - (null)): 'ushort*' and 'ubyte*'
```
This appears to be the case as far back as 2.078.x. There is a changelog entry for its deprecation in 2.078.0's release, but why was it deprecated when it already didn't compile?
Comment #1 by robert.schadek — 2024-12-13T19:30:46Z