[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/14082] New: fails to build with error: array subscript is below
From: |
agarcia at igalia dot com |
Subject: |
[Bug gas/14082] New: fails to build with error: array subscript is below array bounds |
Date: |
Wed, 09 May 2012 07:35:21 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=14082
Bug #: 14082
Summary: fails to build with error: array subscript is below
array bounds
Product: binutils
Version: 2.22
Status: NEW
Severity: normal
Priority: P2
Component: gas
AssignedTo: address@hidden
ReportedBy: address@hidden
Classification: Unclassified
The Z80 target of binutils 2.22 fails to build with recent versions of gcc:
gcc -DHAVE_CONFIG_H -I. -I/tmp/binutils-z80-2.22/src/gas -I.
-I/tmp/binutils-z80-2.22/src/gas -I../bfd
-I/tmp/binutils-z80-2.22/src/gas/config
-I/tmp/binutils-z80-2.22/src/gas/../include -I/tmp/binutils-z80-2.22/src/gas/..
-I/tmp/binutils-z80-2.22/src/gas/../bfd -DLOCALEDIR="\"/usr/share/locale\"" -W
-Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT
app.o -MD -MP -MF .deps/app.Tpo -c -o app.o
/tmp/binutils-z80-2.22/src/gas/app.c
/tmp/binutils-z80-2.22/src/gas/app.c: In function 'do_scrub_chars':
/tmp/binutils-z80-2.22/src/gas/app.c:1346:23: error: array subscript is below
array bounds [-Werror=array-bounds]
cc1: all warnings being treated as errors
Checking for EOF seems to fix the problem, but I don't know if this is the
proper solution in this case.
See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672057
--- app.c.~1.53.~ 2012-01-26 16:56:49.000000000 +0200
+++ app.c 2012-05-09 10:20:46.327483281 +0300
@@ -1344,7 +1344,7 @@
else
{
state = 9;
- if (!IS_SYMBOL_COMPONENT (ch))
+ if (ch == EOF || !IS_SYMBOL_COMPONENT (ch))
{
if (ch != EOF)
UNGET (ch);
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
- [Bug gas/14082] New: fails to build with error: array subscript is below array bounds,
agarcia at igalia dot com <=