我不能找到一种方法来转换guint8到uint32_t的用C 我想: uint32_t *uint32_value = (uint32_t *)guint8_value;
但它说: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
uint32_t *uint32_value
我有一个非常简单的ELF可执行文件: $ readelf -l ./plt.out
Elf file type is EXEC (Executable file)
Entry point 0x400338
There are 7 program headers, starting at offset 64
Program Headers:
Type Offset V
我总是用char作为unsigned char和wchar_t作为wint_t。鉴于此,是否存在解决方案来更改函数接口来使用这些类型(有或没有重新编译glibc)?另请参阅此问题:How to change wchar.h to make wchar_t the same type as wint_t?
为什么islower()和朋友需要处理EOF,而putchar()和朋友不需要? 为什么不将islower()视为int为unsigned char,如putchar()的情况那样?这样做会很有意义,因为我们必须首先检查EOF。另请参见Why the argument type of putchar(), fputc(), and putc() is not char?