diff --git a/base/deprecated.jl b/base/deprecated.jl index 80f8e239dd64c..3e7cbd3efcf8b 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -36,15 +36,15 @@ macro deprecate(old,new) end function depwarn(msg, funcsym) + # don't warn about deprecations if --no-depwarn is specified + compileropts().no_depwarn == 0 && return bt = backtrace() caller = firstcaller(bt, funcsym) warn(msg, once=(caller!=C_NULL), key=caller, bt=bt) end -shouldwarn() = (opts = compileropts(); bool(opts.depwarn)) function firstcaller(bt::Array{Ptr{Void},1}, funcsym::Symbol) - !shouldwarn() && return C_NULL # Identify the calling line i = 1 while i <= length(bt)