This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[BUILDROBOT] m68k-linux: gas: array subscript is below array bounds


After updating gcc on one of the builders, I found a build
where gcc complained:

gcc -DHAVE_CONFIG_H -I. -I/home/vaxbuild/repos/binutils_gdb/gas  -I. -I/home/vaxbuild/repos/binutils_gdb/gas -I../bfd -I/home/vaxbuild/repos/binutils_gdb/gas/config -I/home/vaxbuild/repos/binutils_gdb/gas/../include -I/home/vaxbuild/repos/binutils_gdb/gas/.. -I/home/vaxbuild/repos/binutils_gdb/gas/../bfd -DLOCALEDIR="\"/home/vaxbuild/build/m68k-linux/_install_/share/locale\""  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT tc-m68k.o -MD -MP -MF .deps/tc-m68k.Tpo -c -o tc-m68k.o `test -f 'config/tc-m68k.c' || echo '/home/vaxbuild/repos/binutils_gdb/gas/'`config/tc-m68k.c
/home/vaxbuild/repos/binutils_gdb/gas/config/tc-m68k.c: In function âmd_assembleâ:
/home/vaxbuild/repos/binutils_gdb/gas/config/tc-m68k.c:4514:36: error: array subscript is below array bounds [-Werror=array-bounds]
   n = (the_ins.numo - the_ins.fragb[n - 1].fragoff);
cc1: all warnings being treated as errors
make[3]: *** [tc-m68k.o] Error 1

On a first glance, the error could be correct for the first loop with
n=0. OTOH, this code is some 15 years old and seems to be working.
(And it's too early in the morning *cough*.)  So this is just a
heads-up, maybe totally bogus.


      Jan-Benedict Glaw              +49-172-7608481
Signature of: "Debugging is twice as hard as writing the code in the first place.
the second  :  Therefore, if you write the code as cleverly as possible, you are,
               by definition, not smart enough to debug it." - Brian W. Kernighan

Attachment: signature.asc
Description: Digital signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]