From 58e5be5f6e42367641f79727d2f24ccab520abe8 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Thu, 21 Jan 2010 16:23:13 -0800 Subject: [PATCH] Warning for implicitly declared variables. --- Cython/Compiler/ExprNodes.py | 2 ++ 1 file changed, 2 insertions(+) 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: -- 2.26.2