Open
Description
Since bit aligned pointers is represented as meta data on the pointer type at compile time, it doesn't make sense to allow @ptrToInt
on these pointers, as the address cannot be represented at runtime.
const A = packed struct {
a: u4,
b: u4
};
test \"\" {
var a: A = undefined;
_ = @ptrToInt(&a.a); // This is ok. a.a is on a byte bound so we can have a runtime address to it
_ = @ptrToInt(&a.b); // This should be an error. The address this will return is actually the address to ´a.a´
}