Consider this C++: int main (void) { double foo[4096]; ((char *)(foo))[(sizeof(foo)-1)] = '\0'; return 0; } It outputs: test.cp:4:12: warning: array index of '32767' indexes past the end of an array (that contains 4096 elements) [-Warray-bounds] ((char *)(foo))[(sizeof(foo)-1)] = '\0'; ^ ~~~~~~~~~~~~~ It's a false positive. Note the cast to char*. This is with clang version 3.0 (trunk 138577).
*** Bug 10937 has been marked as a duplicate of this bug. ***
This happens e.g. in ICU
In my case, the original code in question is from the open source ITK project. The warning can be seen on its nightly dashboard: http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=1533029
r139990
Confirmed fixed.