fix integer width bug, and add example code from gcc