[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: strange warnings
- From: Cuero Bugot <cbugot@...>
- Date: Thu, 9 Jun 2011 09:02:02 -0700
> lvm.c: In function ‘luaV_concat’:
> lvm.c:300: warning: assuming signed overflow does not occur when simplifying conditional to constant
Very wild guess:
Line293 for (n = 1; n < total && tostring(L, top-n-1); n++) {
=> it knows that n will be strictly superior to zero (if it does not overflow), but it does not matter until...
...
Line300 for (i=n; i>0; i--) { /* concat all strings */
At that line, if it knows that n>0, then it could run the first pass of the for loop without having to do the test for ending the loop. (I am not sure though that it actually would make sense optimization wise (I guess dis-assembly could comfort that guess?))
So it tells you that at line 300 it assumes that n>0 even though it might have been overflowed at line 293...
That's a wild guess really ;-)
Cuero