I'm getting warnings about uninitialised variables in try/finally
blocks. As far as I can follow the flow in the generated C code, the
warning is actually superfluous. Any chance for this being pushed?

diff -r 6488f2d89e72 Cython/Compiler/Nodes.py
--- a/Cython/Compiler/Nodes.py  Tue Aug 19 04:13:56 2008 -0700
+++ b/Cython/Compiler/Nodes.py  Thu Aug 21 18:24:40 2008 -0300
@@ -3667,6 +3667,9 @@ class TryFinallyStatNode(StatNode):
                 code.putln(
                     "int %s;" % Naming.exc_lineno_name)
             code.use_label(catch_label)
+            if error_label_used and self.preserve_exception:
+                code.put(
+                    "%s = 0; " % Naming.exc_lineno_name)
             code.putln(
                     "__pyx_why = 0; goto %s;" % catch_label)
             for i in cases_used:


-- 
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

Reply via email to