lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> lua.c: In function ‘pmain’:
> lua.c:353: warning: assuming signed overflow does not occur when simplifying conditional to constant

Well following the assumption, the same reasoning could apply there:
collectargs is declared static, and the compiler decided to inline it, in the function we have the same pattern:
	for (i = 1; argv[i] != NULL; i++) {
	    if (argv[i][0] != '-')  /* not an option? */
	        return i;

so when doing the test
	if (script < 0) {  
it did assume that the previous for loop did not overflow i.

That actually makes sense, but it could probably be confirmed by decompiling the assembly.