http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49859
--- Comment #3 from Wojciech Koszek <wkoszek at gmail dot com> 2011-07-27 01:28:28 UTC --- Looks like GCC and Clang both agree on Duff's stuff: wkoszek@wkoszek:~/p/duff$ cat duff.c #include <stdio.h> void duff(to, from, count) register short *to, *from; register int count; { register int n=(count+7)/8; switch(count%8){ case 0: do{ *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; }while(--n>0); } } int main(int argc, char **argv) { short *dummy = NULL; (void)argc; (void)argv; duff(dummy, dummy, 123); return 0; } wkoszek@wkoszek:~/p/duff$ gcc -Wall -pedantic -Wunreachable-code -c duff.c wkoszek@wkoszek:~/p/duff$ clang -Wall -pedantic -Wunreachable-code -c duff.c