阅读背景:

将一个int指针转换为char ptr,反之亦然

来源:互联网 

The problem is simple. As I understand, GCC maintains that chars will be byte-aligned and ints 4-byte-aligned in a 32-bit environment. I am also aware of C99 standard 6.3.2.3 which says that casting between misaligned pointer-types results in undefined operations. What do the other standards of C say about this? There are also many experienced coders here - any view on this will be appreciated.The problem is simple. As I understand, GCC mai




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: