http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47979
--- Comment #1 from Xiaofeng Guo <xiaofengguo at google dot com> 2011-03-03 20:36:32 UTC --- Because I can't find the attachment in the thread, add the text below for debugging easily. ================================================== #include <stdio.h> #include <string.h> int main() { const char *str = "1234567"; int hash = 17; for (int i = 0; i < strlen(str); ++i) { hash = 37 * hash + str[i]; } printf("hash = %d, %d\n", hash, hash < 0); int result = (hash < 0) ? (-hash) : hash; printf("result = %d\n", result); return 0; } ===================================================