On Sun, Oct 19, 2008 at 1:38 AM, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > On Oct 17, 2008, at 8:14 AM, Lisandro Dalcin wrote: > >> OK, I've opened a new ticket (#104) in track. >> http://trac.cython.org/cython_trac/ticket/104 >> >> If there are no objections, I'll push the patch an close the ticket. > > Yes, please do.
Done. > Did you open a ticket for the unused variables warnings? Ticket #140 could be closed. But some warnings are still there and need a more close look; they are signaling actual code generation problems. So, they perhaps deserve new tickets for each case. So Robert, I'll ask you to run the full test suite, take a fast look at the few warnings remaining, and close ticket #140 if you consider that appropriate. > >> >> >> >> >> On Thu, Oct 16, 2008 at 4:29 PM, Dag Sverre Seljebotn >> <[EMAIL PROTECTED]> wrote: >>> Lisandro wrote: >>>> Then my patch will fix test cases like the above as follow: >>>> >>>> cdef void foo(): >>>> int var1, var2=0 >>>> var1 = var2 >>>> >>>> foo() >>>> >>>> Note that I'm just initializing 'var2' and using 'foo'. Do you >>>> see any >>>> drawback about that? >>> >>> Well, there are drawbacks, but I'm getting less worried about how >>> serious >>> they are. >>> >>> But I'll just explain the drawbacks for the sake of the >>> explanation. We >>> just had a severe bug espace our attention for months (and which you >>> found) because >>> >>> """ >>> cdef object unused >>> """ >>> >>> was not a testcase. Now >>> >>> """ >>> cdef object unusded = 3 >>> """ >>> >>> would not have helped -- in fact this is an entirely different >>> testcase! >>> The latter one makes "entry.used" be set differently and would >>> trigger >>> entirely different paths through the code in Cython. >>> >>> Now, local variables are a different matter. In fact, I don't know >>> how >>> they work myself. I just know that if they are initialized, the >>> testcase >>> tests something else than what it originally tested -- some if-tests >>> within Cython (concerning entry.used and so on) may start taking >>> another >>> route, and perhaps some code blocks are then left untested. >>> >>> But this can be countered by creating a new testcase specifically >>> targeted >>> for covering what you now remove, so I'm getting more friendly >>> towards >>> your patch. >>> >>> Dag Sverre >>> >>> _______________________________________________ >>> Cython-dev mailing list >>> [email protected] >>> http://codespeak.net/mailman/listinfo/cython-dev >>> >> >> >> >> -- >> Lisandro Dalcín >> --------------- >> Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) >> Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) >> Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) >> PTLC - Güemes 3450, (3000) Santa Fe, Argentina >> Tel/Fax: +54-(0)342-451.1594 >> _______________________________________________ >> Cython-dev mailing list >> [email protected] >> http://codespeak.net/mailman/listinfo/cython-dev > > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev > -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
