#3750 closed defect (fixed)
Nagra issue on build with gcc 4.9 found
Reported by: | Gorgone Impertinence | Owned by: | |
---|---|---|---|
Priority: | minor | Component: | General |
Severity: | low | Keywords: | |
Cc: | Sensitive: | no |
Description
reader-nagra.c: In function 'nagra2_do_ecm': reader-nagra.c:1098:33: warning: iteration 4u invokes undefined behavior [-Waggressive-loop-optimizations] if(reader->ecmcommandcache[t] == er->ecm[3]) { matchfound++; } ^ reader-nagra.c:1096:11: note: containing loop while(t < 5) ^
Change History (6)
comment:1 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 10 years ago
@Gorgone:
If you don't know what you're doing, don't touch the code: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57199
In this case it's also a bogus warning, because t never reaches 5 or rather we get not in touch with the 5th bound of ecmcommandcache because of while(t < 5)!
comment:3 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
DaMulda shut up
the default array is defined to have 4 elements the count begins @ 0 so 4th = 5
so the loop fails with error
the compiler cant know if its possible or not !!!
comment:5 by , 10 years ago
Sorry for that, you'r right.
I haven't switch the way of thinking, from my work today. My colleagues love it to start the bounds at 1 within our LotusScript projects.
Note:
See TracTickets
for help on using tickets.
fixed in #9750
is defined as