int const * ptr2ci; // a nonconst pointer to const object, right?
int * const cptr2i; // const pointer to nonconst object
If comments above are valid, then shouldn't near pointer to nonnear object be defined like this
int * near nptr2i;
I think this ^^ should mean that ptr is to be placed to __SHORT_SEG and ptr should be able to address all 64k addresses.
And this pointer
int near * ptr2ni;
could be placed anywhere and should be able to address only objects in __SHORT_SEG (addresses 0..0xFF).
But it looks like in reality it is reversed, ptr2ni behaves like nptr2i, and opposite.
61: *ptr2ni = 5;
0000 320000  LDHX ptr2ni <- pointer is 16bits wide
0003 7f  CLR ,X
0004 a605  LDA #5
0006 e701  STA 1,X
62: ptr2ni = (void*)5;
0008 ae05  LDX #5
000a 8c  CLRH
000b 960000  STHX ptr2ni <- pointer is 16bits wide
61: *nptr2i = 5;
0000 ce0000  LDX nptr2i <- pointer is 8bits wide
0003 8c  CLRH <- widening X-> H:X
0004 7f  CLR ,X
0005 a605  LDA #5
0007 e701  STA 1,X
62: nptr2i = (void*)5;
0009 ae05  LDX #5
000b cf0000  STX nptr2i
Is it normal?
CW help system is bit fuzzy, it gives following example
I guess __far on the right is a typo. Also there's no int __near * i; case.