From: Robert Bradshaw Date: Fri, 22 Jan 2010 00:23:13 +0000 (-0800) Subject: Warning for implicitly declared variables. X-Git-Tag: 0.12.1~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=58e5be5f6e42367641f79727d2f24ccab520abe8;p=cython.git Warning for implicitly declared variables. --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 6679002a..625d16af 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -1157,6 +1157,8 @@ class NameNode(AtomicExprNode): if not self.entry: self.entry = env.lookup_here(self.name) if not self.entry: + if env.directives['warn.undeclared']: + warning(self.pos, "implicit declaration of '%s'" % self.name, 1) if env.directives['infer_types'] != False: type = unspecified_type else: