File 1154-Deprecate-old-catches-in-compiler.patch of Package erlang
From 21471e45ef1049f1b12fa03ea1f6d9b7bc9a394e Mon Sep 17 00:00:00 2001
From: Richard Carlsson <carlsson.richard@gmail.com>
Date: Sun, 8 Dec 2024 19:41:27 +0100
Subject: [PATCH 4/5] Deprecate old catches in compiler
---
lib/compiler/src/Makefile | 2 +-
lib/compiler/src/core_scan.erl | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/compiler/src/Makefile b/lib/compiler/src/Makefile
index 9b50016bb5..72f05e0ee8 100644
--- a/lib/compiler/src/Makefile
+++ b/lib/compiler/src/Makefile
@@ -138,7 +138,7 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += -Werror
+ERL_COMPILE_FLAGS += -Werror +warn_deprecated_catch
ERL_COMPILE_FLAGS += +inline +warn_unused_import \
-I../../stdlib/include -I$(EGEN) -W +warn_missing_spec
diff --git a/lib/compiler/src/core_scan.erl b/lib/compiler/src/core_scan.erl
index 2af3397ad5..64f30e01fa 100644
--- a/lib/compiler/src/core_scan.erl
+++ b/lib/compiler/src/core_scan.erl
@@ -46,6 +46,8 @@
-module(core_scan).
-moduledoc false.
+-compile(nowarn_deprecated_catch).
+
-export([string/1, string/2, format_error/1]).
-import(lists, [reverse/1]).
--
2.43.0