I get the following warning on Debian GNU/Linux when compiling with -O2. This is with GCC 4.6.3. $ CFLAGS='-O2' ./configure && make ... gdb/cstub.c: In function 'grub_gdb_trap': gdb/cstub.c:83:21: error: array subscript is above array bounds [-Werror=array-bounds] cc1: all warnings being treated as errors make[3]: *** [gdb/gdb_module-cstub.o] Error 1 make[3]: Leaving directory `/tmp/GRUB/trunk/grub-core' Afaics, the out-of-bounds error is real, and the attached patch fixes it. Grégoire