Skip to content

Commit 698e720

Browse files
committed
--no-depwarn turns of method warnings as well
1 parent 1ef4558 commit 698e720

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

base/deprecated.jl

+3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ function depwarn(msg, funcsym)
3838
warn(msg, once=(caller!=C_NULL), key=caller, bt=bt)
3939
end
4040

41+
shouldwarn() = (opts = compileropts(); bool(opts.depwarn))
42+
4143
function firstcaller(bt::Array{Ptr{Void},1}, funcsym::Symbol)
44+
!shouldwarn() && return C_NULL
4245
# Identify the calling line
4346
i = 1
4447
while i <= length(bt)

base/util.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ end
242242
warn(err::Exception; prefix="ERROR: ", kw...) =
243243
warn(sprint(io->showerror(io,err)), prefix=prefix; kw...)
244244

245-
# Julia compiler options struct
245+
# Julia compiler options struct (see jl_compileropts_t in src/julia.h)
246246
immutable JLCompilerOpts
247247
build_path::Ptr{Cchar}
248248
code_coverage::Int8

ui/repl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static const char *opts =
8888
" -O, --optimize Run time-intensive code optimizations\n"
8989
" --int-literals={32|64} Select integer literal size independent of platform\n"
9090
" --dump-bitcode={yes|no} Dump bitcode for the system image (used with --build)\n"
91-
" --no-depwarn Turn off deprecated syntax warnings\n";
91+
" --no-depwarn Turn off syntax and method deprecation warnings\n";
9292

9393
void parse_opts(int *argcp, char ***argvp)
9494
{

0 commit comments

Comments
 (0)