From 2654cb43f63349cff06b3dd26932dd76f53aed4c Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sat, 26 Sep 2015 01:59:48 +0000 Subject: 36651: WARN_CREATE_GLOBAL += math expressions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this, '() { (( x=42 )) }' and '() { for (( i=0; … )) }' wouldn't warn about $x and $i, respectively, being created global. --- Doc/Zsh/options.yo | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Doc/Zsh/options.yo') diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo index abd0f8715..fbf65abbc 100644 --- a/Doc/Zsh/options.yo +++ b/Doc/Zsh/options.yo @@ -746,7 +746,8 @@ pindex(NOWARNCREATEGLOBAL) cindex(parameters, warning when created globally) item(tt(WARN_CREATE_GLOBAL))( Print a warning message when a global parameter is created in a function -by an assignment. This often indicates that a parameter has not been +by an assignment or in math context. +This often indicates that a parameter has not been declared local when it should have been. Parameters explicitly declared global from within a function using tt(typeset -g) do not cause a warning. Note that there is no warning when a local parameter is assigned to in -- cgit 1.4.1