https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65040
--- Comment #9 from Jiri Slaby <jirislaby at gmail dot com> --- What about this? #include <stdio.h> void x(char *ch) { printf("%x\n", ch[10]); } It still produces the warning. (I cannot reopen as I am not a reporter.)