代码打印不出来,报错

struct test
{    
    int Num;
    char* pcName;
    short sDate;
    char cha[2];
    short sBa[4];
}* p;


int main()
{
    p=(struct test*)0x100000;  //假设p的地址是0x100000 
    printf("%p\n",p + 0x1);
    printf("%p\n",(unsigned long)p + 0x1);
    printf("%p\n",(unsigned int*)p + 0x1);
    return 0;
}

[Warning] cast from pointer to integer of different size [-Wpointer-to-int-cast]

想了解下上面的代码哪出问题了,怎么改?

我用vs2019测试了一下,是可以正常运行的:

img