<分区>
#include <stdio.h>
#include <stdint.h>
int main(){
uint64_t a = 1 << 63;
/* do some thing */
return 0;
}
$ gcc -Wall -Wextra -std=c99 test.c -o test
warning: left shift count >= width of type [-Wshift-count-overflow]
问:uint64_t
应该是64位宽度,为什么左移会溢出?