Trac #158 (defined after used) a warning for now for backwards compatability.
authorRobert Bradshaw <robertwb@math.washington.edu>
Thu, 9 Apr 2009 11:57:44 +0000 (04:57 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Thu, 9 Apr 2009 11:57:44 +0000 (04:57 -0700)
Will change in 0.12

Cython/Compiler/ParseTreeTransforms.py

index 45ed94b40c38d0d552a6577c725d46024f0b8cdd..cd15015bee489d646b4669370c2c6151330f3763 100644 (file)
@@ -730,7 +730,7 @@ property NAME:
         if node.name in self.seen_vars_stack[-1]:
             entry = self.env_stack[-1].lookup(node.name)
             if entry is None or entry.visibility != 'extern':
-                error(node.pos, "cdef variable '%s' declared after it is used" % node.name)
+                warning(node.pos, "cdef variable '%s' declared after it is used" % node.name, 2)
         self.visitchildren(node)
         return node