Testing GCC 8 with recent Linux kernel sources has uncovered a bug in the handling of arrays of arrays by the -Wrestrict checker where it fails to take references to different array elements into consideration, issuing false positives. The attached patch corrects this mistake. In addition, to make warnings involving excessive offset bounds more meaningful (less confusing), I've made a cosmetic change to constrain them to the bounds of the accessed object. I've done this in response to multiple comments indicating that the warnings are hard to interpret. This change is meant to be applied on top of the patch for bug 83698 (submitted mainly to improve the readability of the offsets): https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01488.html Martin