gcc-4.4 gave spurious "warning: array subscript is above array bounds"
Bug #732711 reported by
Edmund Grimley Evans
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-4.4 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: gcc-4.4
// This code gives a spurious
// "warning: array subscript is above array bounds"
// with gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
// when compiled with: gcc -c -O2 -Wall
struct s { int a[100]; };
void f(struct s *ps, int i)
{
int *a = ps->a;
if (i >= 0x20000000 && i < 0x20000004)
a[i - 0x20000000] = 0;
}
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: gcc-4.4 4.4.4-14ubuntu5
ProcVersionSign
Uname: Linux 2.6.35-980-omap4 armv7l
Architecture: armel
Date: Thu Mar 10 16:51:56 2011
ProcEnviron:
LC_COLLATE=C
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: gcc-4.4
To post a comment you must log in.