Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions erts/preloaded/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ KERNEL_SRC=$(ERL_TOP)/lib/kernel/src
KERNEL_INCLUDE=$(ERL_TOP)/lib/kernel/include
STDLIB_INCLUDE=$(ERL_TOP)/lib/stdlib/include

ERL_COMPILE_FLAGS += -I$(KERNEL_SRC) -I$(KERNEL_INCLUDE)
ERL_COMPILE_FLAGS += -I$(KERNEL_SRC) -I$(KERNEL_INCLUDE) +nowarn_deprecated_catch

ifeq ($(ERL_DETERMINISTIC),yes)
ERL_COMPILE_FLAGS += +deterministic
Expand Down Expand Up @@ -174,4 +174,4 @@ dialyzer: $(DIA_PLT)
$(DIA_WARNINGS) \
--verbose
DEP_REL_TOP=../../../lib/
include $(ERL_TOP)/make/dep.mk
include $(ERL_TOP)/make/dep.mk
2 changes: 1 addition & 1 deletion lib/asn1/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ EXAMPLES = \

ERL_COMPILE_FLAGS += \
-I$(ERL_TOP)/lib/stdlib \
-Werror
-Werror +nowarn_deprecated_catch

ifeq ($(ERL_DETERMINISTIC),yes)
YRL_FLAGS = +deterministic
Expand Down
2 changes: 2 additions & 0 deletions lib/asn1/test/asn1_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

-module(asn1_SUITE).

-compile(nowarn_deprecated_catch).

%% Suppress compilation of an addititional module compiled for maps.
-define(NO_MAPS_MODULE, asn1_test_lib_no_maps).

Expand Down
2 changes: 2 additions & 0 deletions lib/asn1/test/asn1_app_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
init_per_suite/1,end_per_suite/1,
appup/1,fields/1,modules/1,export_all/1,app_depend/1]).

-compile(nowarn_deprecated_catch).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

all() ->
Expand Down
2 changes: 1 addition & 1 deletion lib/asn1/test/asn1_test_lib.erl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ compile(File, Config, Options) -> compile_all([File], Config, Options).
compile_all(Files, Config, Options0) ->
DataDir = proplists:get_value(data_dir, Config),
CaseDir = proplists:get_value(case_dir, Config),
Options = [{outdir,CaseDir},debug_info|Options0],
Options = [{outdir,CaseDir},debug_info,nowarn_deprecated_catch|Options0],

Comp = fun(F) ->
compile_file(filename:join(DataDir, F), Options)
Expand Down
2 changes: 2 additions & 0 deletions lib/asn1/test/testChoPrim.erl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

-include_lib("common_test/include/ct.hrl").

-compile(nowarn_deprecated_catch).

bool(Rules) ->
roundtrip('ChoCon', {bool0,true}),
roundtrip('ChoCon', {bool1,true}),
Expand Down
2 changes: 2 additions & 0 deletions lib/asn1/test/testEnumExt.erl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

-include_lib("common_test/include/ct.hrl").

-compile(nowarn_deprecated_catch).

main(Rule) when Rule =:= per; Rule =:= uper ->
io:format("main(~p)~n",[Rule]),

Expand Down
2 changes: 2 additions & 0 deletions lib/asn1/test/testInfObj.erl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

-export([main/1]).

-compile(nowarn_deprecated_catch).

-record('InitiatingMessage',{procedureCode,criticality,value}).
-record('InitiatingMessage2',{procedureCode,criticality,value}).
-record('Iu-ReleaseCommand',{first,second}).
Expand Down
2 changes: 1 addition & 1 deletion lib/common_test/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ DTD_FILES = \
# FLAGS
# ----------------------------------------------------
ERL_COMPILE_FLAGS += -pa ../ebin -I../include -I $(ERL_TOP)/lib/snmp/include/ \
-I../../xmerl/inc/ -I $(ERL_TOP)/lib/kernel/include -Werror
-I../../xmerl/inc/ -I $(ERL_TOP)/lib/kernel/include -Werror +nowarn_deprecated_catch

# ----------------------------------------------------
# Targets
Expand Down
2 changes: 1 addition & 1 deletion lib/common_test/test_server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TS_TARGETS = $(TS_MODULES:%=$(EBIN)/%.$(EMULATOR))
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
ERL_COMPILE_FLAGS += -I../include -Werror +nowarn_missing_spec_documented
ERL_COMPILE_FLAGS += -I../include -Werror +nowarn_missing_spec_documented +nowarn_deprecated_catch

# ----------------------------------------------------
# Targets
Expand Down
6 changes: 2 additions & 4 deletions lib/compiler/src/compile.erl
Original file line number Diff line number Diff line change
Expand Up @@ -713,11 +713,9 @@ value are listed.
Default is to emit warnings for every use of a callback known by the compiler to
be deprecated.

- **`warn_deprecated_catch`** - Enables warnings for use of old style catch
- **`nowarn_deprecated_catch`** - Turns off warnings for use of old style catch
expressions of the form `catch Expr` instead of the modern `try ... catch
... end`. You may enable this compiler option on the project level and
add `-compile(nowarn_deprecated_catch).` to individual files which still
contain old catches in order to prevent new uses from getting added.
... end`.

- **`nowarn_removed`** - Turns off warnings for calls to functions that have
been removed. Default is to emit warnings for every call to a function known
Expand Down
6 changes: 3 additions & 3 deletions lib/compiler/test/warnings_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ maps(Config) when is_list(Config) ->
{'EXIT',{badarg,_}} = (catch(M#{ a => 1 })),
ok.
">>,
[],
[nowarn_deprecated_catch],
{warnings,[{{4,48},sys_core_fold,{failed,bad_map_update}}]}},
{bad_map_src2,
<<"
Expand All @@ -741,15 +741,15 @@ maps(Config) when is_list(Config) ->
ok.
id(I) -> I.
">>,
[inline],
[inline,nowarn_deprecated_catch],
[]},
{bad_map_src3,
<<"
t() ->
{'EXIT',{badarg,_}} = (catch <<>>#{ a := 1}),
ok.
">>,
[],
[nowarn_deprecated_catch],
{warnings,[{{3,51},sys_core_fold,{failed,bad_map_update}}]}},
{ok_map_literal_key,
<<"
Expand Down
2 changes: 1 addition & 1 deletion lib/debugger/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ APPUP_TARGET = $(EBIN)/$(APPUP_FILE)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
ERL_COMPILE_FLAGS += -Werror -I $(ERL_TOP)/lib -pa $(ERL_TOP)/lib/wx/ebin
ERL_COMPILE_FLAGS += -Werror -I $(ERL_TOP)/lib -pa $(ERL_TOP)/lib/wx/ebin +nowarn_deprecated_catch


# ----------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions lib/dialyzer/src/dialyzer_dataflow.erl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
-module(dialyzer_dataflow).
-moduledoc false.

-compile(nowarn_deprecated_catch).

-export([get_fun_types/5, get_warnings/5, format_args/3]).

-include("dialyzer.hrl").
Expand Down
2 changes: 1 addition & 1 deletion lib/diameter/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ endif

ERL_COMPILE_FLAGS += \
+warn_export_vars \
+warn_unused_vars \
+warn_unused_vars +nowarn_deprecated_catch \
$(MISSING_SPEC_DOCUMENTED) \
+'{parse_transform,sys_pre_attributes}' \
+'{attribute,insert,app_vsn,"$(APP_VSN)"}' \
Expand Down
2 changes: 1 addition & 1 deletion lib/eldap/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ APP_TARGET = $(EBIN)/$(APP_FILE)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
ERL_COMPILE_FLAGS += -I../include -I../ebin -Werror
ERL_COMPILE_FLAGS += -I../include -I../ebin -Werror +nowarn_deprecated_catch

# ----------------------------------------------------
# Targets
Expand Down
2 changes: 1 addition & 1 deletion lib/et/examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
ERL_COMPILE_FLAGS += -pa ../../et/ebin +nowarn_missing_doc +nowarn_missing_spec_documented
ERL_COMPILE_FLAGS += -pa ../../et/ebin +nowarn_missing_doc +nowarn_missing_spec_documented +nowarn_deprecated_catch
EBIN = .

# ----------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion lib/et/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ ERL_COMPILE_FLAGS += -pa $(ERL_TOP)/lib/et/ebin \
-pa $(ERL_TOP)/lib/wx/ebin \
-I../include \
-I $(ERL_TOP)/lib \
-Werror
-Werror +nowarn_deprecated_catch

# ----------------------------------------------------
# Special Build Targets
Expand Down
2 changes: 1 addition & 1 deletion lib/ftp/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
EXTRA_ERLC_FLAGS = +warn_unused_vars
EXTRA_ERLC_FLAGS = +warn_unused_vars +nowarn_deprecated_catch
ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/kernel/src \
-pz $(EBIN) \
-pz $(ERL_TOP)/lib/public_key/ebin \
Expand Down
2 changes: 1 addition & 1 deletion lib/inets/src/inets_app/inets.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ INETS_APP_VSN_COMPILE_FLAGS = \

INETS_ERL_COMPILE_FLAGS += \
-pa $(ERL_TOP)/lib/inets/ebin \
$(INETS_APP_VSN_COMPILE_FLAGS)
$(INETS_APP_VSN_COMPILE_FLAGS) +nowarn_deprecated_catch

2 changes: 1 addition & 1 deletion lib/megaco/examples/meas/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ endif

ERL_COMPILE_FLAGS += \
-pa $(ERL_TOP)/lib/megaco/ebin \
-I../include +nowarn_missing_spec_documented
-I../include +nowarn_missing_spec_documented +nowarn_deprecated_catch

DIA_PLT = megaco_example_meas.plt
DIA_ANALYSIS = $(basename $(DIA_PLT)).dialyzer_analysis
Expand Down
2 changes: 1 addition & 1 deletion lib/megaco/examples/simple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ endif

ERL_COMPILE_FLAGS += \
-pa $(ERL_TOP)/lib/megaco/ebin \
+nowarn_missing_doc +nowarn_missing_spec_documented \
+nowarn_missing_doc +nowarn_missing_spec_documented +nowarn_deprecated_catch \
-I../../include

ifneq ($(MGC_HOST),)
Expand Down
3 changes: 1 addition & 2 deletions lib/megaco/src/app/megaco.mk
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,4 @@ MEGACO_APP_VSN_COMPILE_FLAGS = \
MEGACO_ERL_COMPILE_FLAGS += \
-pa $(ERL_TOP)/lib/et/ebin \
-pa $(ERL_TOP)/lib/megaco/ebin \
$(MEGACO_APP_VSN_COMPILE_FLAGS)

$(MEGACO_APP_VSN_COMPILE_FLAGS) +nowarn_deprecated_catch
2 changes: 1 addition & 1 deletion lib/mnesia/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
# FLAGS
# ----------------------------------------------------
ERL_COMPILE_FLAGS += \
-Werror \
-Werror +nowarn_deprecated_catch \
+'{parse_transform,sys_pre_attributes}' \
+'{attribute,insert,vsn,"mnesia_$(MNESIA_VSN)"}'

Expand Down
2 changes: 1 addition & 1 deletion lib/observer/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ ERL_COMPILE_FLAGS += \
-I ../../../libraries/et/include \
-I $(ERL_TOP)/lib \
-pa $(ERL_TOP)/lib/wx/ebin \
-Werror
-Werror +nowarn_deprecated_catch

# ----------------------------------------------------
# Targets
Expand Down
3 changes: 2 additions & 1 deletion lib/observer/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ RELSYSDIR = $(RELEASE_PATH)/observer_test
# FLAGS
# ----------------------------------------------------
ERL_MAKE_FLAGS +=
ERL_COMPILE_FLAGS += +warnings_as_errors +nowarn_export_all +nowarn_missing_spec_documented
ERL_COMPILE_FLAGS += +warnings_as_errors +nowarn_export_all +nowarn_missing_spec_documented +nowarn_deprecated_catch

ERL_COMPILE_FLAGS := $(filter-out +deterministic,$(ERL_COMPILE_FLAGS))

EBIN = .
Expand Down
2 changes: 1 addition & 1 deletion lib/parsetools/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
# FLAGS
# ----------------------------------------------------
ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/stdlib/include \
-Werror
-Werror +nowarn_deprecated_catch

# ----------------------------------------------------
# Targets
Expand Down
2 changes: 1 addition & 1 deletion lib/public_key/asn1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ HRL_FILES = $(ASN_HRLS:%=$(INCLUDE)/%)
# FLAGS
# ----------------------------------------------------
EXTRA_ERLC_FLAGS =
ERL_COMPILE_FLAGS += $(EXTRA_ERLC_FLAGS)
ERL_COMPILE_FLAGS += $(EXTRA_ERLC_FLAGS) +nowarn_deprecated_catch

ASN_FLAGS = -bber +der +noobj +asn1config

Expand Down
2 changes: 1 addition & 1 deletion lib/reltool/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ APPUP_TARGET = $(EBIN)/$(APPUP_FILE)

ERL_COMPILE_FLAGS += +'{parse_transform,sys_pre_attributes}' \
+'{attribute,insert,app_vsn,$(APP_VSN)}' \
-Werror \
-Werror +nowarn_deprecated_catch \
-I $(ERL_TOP)/lib

# ----------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion lib/runtime_tools/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ERL_COMPILE_FLAGS += \
-I../include \
-I ../../et/include \
-I ../../../libraries/et/include \
-Werror
-Werror +nowarn_deprecated_catch

# ----------------------------------------------------
# Targets
Expand Down
2 changes: 1 addition & 1 deletion lib/sasl/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
# FLAGS
# ----------------------------------------------------

ERL_COMPILE_FLAGS += -I../../stdlib/include -Werror
ERL_COMPILE_FLAGS += -I../../stdlib/include -Werror +nowarn_deprecated_catch


# ----------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions lib/snmp/examples/ex1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ ERL_COMPILE_FLAGS += -I../include \
+'{attribute,insert,app_vsn,$(APP_VSN)}' \
-I$(ERL_TOP)/lib/stdlib \
+nowarn_missing_doc +nowarn_missing_spec_documented \
+nowarn_deprecated_catch \
$(SNMP_FLAGS)

# ----------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions lib/snmp/examples/ex2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ ERL_COMPILE_FLAGS += -I../include \
+'{attribute,insert,app_vsn,$(APP_VSN)}' \
-I$(ERL_TOP)/lib/stdlib \
+nowarn_missing_doc +nowarn_missing_spec_documented \
+nowarn_deprecated_catch \
$(SNMP_FLAGS)

# ----------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion lib/snmp/src/agent/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ ERL_COMPILE_FLAGS += -I../../include \
+'{attribute,insert,app_vsn,$(APP_VSN)}' \
-I$(ERL_TOP)/lib/stdlib \
$(SNMP_FLAGS) \
+nowarn_missing_spec_documented
+nowarn_missing_spec_documented +nowarn_deprecated_catch


# ----------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion lib/snmp/src/app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ endif
# FLAGS
# ----------------------------------------------------

ERL_COMPILE_FLAGS += -pa $(ERL_TOP)/lib/snmp/ebin
ERL_COMPILE_FLAGS += -pa $(ERL_TOP)/lib/snmp/ebin +nowarn_deprecated_catch

ifeq ($(SNMP_WARNING_AS_ERROR),)
ERL_COMPILE_FLAGS += -Werror
Expand Down
2 changes: 1 addition & 1 deletion lib/snmp/src/compile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ PARSER_TARGET = $(PARSER_MODULE).$(EMULATOR)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
ERL_COMPILE_FLAGS += -pa $(ERL_TOP)/lib/snmp/ebin
ERL_COMPILE_FLAGS += -pa $(ERL_TOP)/lib/snmp/ebin +nowarn_deprecated_catch

ifeq ($(SNMP_WARNING_AS_ERROR),)
ERL_COMPILE_FLAGS += -Werror
Expand Down
2 changes: 1 addition & 1 deletion lib/snmp/src/manager/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ endif
# FLAGS
# ----------------------------------------------------

ERL_COMPILE_FLAGS += -pa $(ERL_TOP)/lib/snmp/ebin
ERL_COMPILE_FLAGS += -pa $(ERL_TOP)/lib/snmp/ebin +nowarn_deprecated_catch

ifeq ($(SNMP_WARNING_AS_ERROR),)
ERL_COMPILE_FLAGS += -Werror
Expand Down
2 changes: 1 addition & 1 deletion lib/snmp/src/misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ endif
# FLAGS
# ----------------------------------------------------

ERL_COMPILE_FLAGS += -pa $(ERL_TOP)/lib/snmp/ebin
ERL_COMPILE_FLAGS += -pa $(ERL_TOP)/lib/snmp/ebin +nowarn_deprecated_catch

ifeq ($(SNMP_WARNING_AS_ERROR),)
ERL_COMPILE_FLAGS += -Werror
Expand Down
2 changes: 1 addition & 1 deletion lib/ssh/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ INTERNAL_HRL_FILES = \
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
EXTRA_ERLC_FLAGS = +warn_unused_vars +nowarn_deprecated_callback
EXTRA_ERLC_FLAGS = +warn_unused_vars +nowarn_deprecated_callback +nowarn_deprecated_catch
ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/kernel/src \
-pz $(EBIN) \
-pz $(ERL_TOP)/lib/public_key/ebin \
Expand Down
2 changes: 1 addition & 1 deletion lib/ssl/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
EXTRA_ERLC_FLAGS = +warn_unused_vars -Werror +nowarn_deprecated_callback
EXTRA_ERLC_FLAGS = +warn_unused_vars -Werror +nowarn_deprecated_callback +nowarn_deprecated_catch
ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/kernel/src \
-pz $(EBIN) \
-pz $(ERL_TOP)/lib/public_key/ebin \
Expand Down
2 changes: 1 addition & 1 deletion lib/stdlib/src/erl_lint.erl
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ bool_options() ->
{deprecated_function,true},
{deprecated_type,true},
{deprecated_callback,true},
{deprecated_catch,false},
{deprecated_catch,true},
{obsolete_guard,true},
{untyped_record,false},
{missing_spec,false},
Expand Down
Loading
Loading