yes, that is very much a valid way of assigning an address to a pointer in C.
When writing to the address you'd have to ensure that that your memory is set up
accordingly though... e.g. though a linker directive file.
I would rather do it as follows though:
#define SOME_ADDRESS (0x22fefc)
int *p2 = (int*)SOME_ADDRESS;
Below is an example of a linker directive file for a power pc processor:
.PPC.EMB.sdata0 0xffff8000 ABS :
.PPC.EMB.sbss0 CLEAR ABS :
.text 0x10000 :
.ROM.data ROM(.data) :
.ROM.sdata ROM(.sdata) :
.sdabase align(8) :
.heap align(16) pad(0x100000) :
.stack align(16) pad(0x80000) :
SOME_ADDRESS 0x0022fefc MIN_SIZE(0x4) :