This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c: Fix bugs where UTF-8 is turned on in mid chunk
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index 8a2c9d6..076df94 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -41,6 +41,9 @@ PERL_CALLCONV void*   Perl_Slab_Alloc(pTHX_ size_t sz)
 PERL_CALLCONV void     Perl_Slab_Free(pTHX_ void *op);
 #define PERL_ARGS_ASSERT_SLAB_FREE     \
        assert(op)
+PERL_CALLCONV void     Perl__force_out_malformed_utf8_message(pTHX_ const U8 *const p, const U8 * const e, const U32 flags, const bool die_here);
+#define PERL_ARGS_ASSERT__FORCE_OUT_MALFORMED_UTF8_MESSAGE     \
+       assert(p); assert(e)
 PERL_CALLCONV bool     Perl__is_in_locale_category(pTHX_ const bool compiling, const int category);
 PERL_CALLCONV bool     Perl__is_uni_FOO(pTHX_ const U8 classnum, const UV c)
                        __attribute__warn_unused_result__;
@@ -51,10 +54,15 @@ PERL_CALLCONV bool  Perl__is_uni_perl_idcont(pTHX_ UV c)
 PERL_CALLCONV bool     Perl__is_uni_perl_idstart(pTHX_ UV c)
                        __attribute__warn_unused_result__;
 
-PERL_CALLCONV bool     Perl__is_utf8_FOO(pTHX_ const U8 classnum, const U8 *p)
+PERL_CALLCONV bool     Perl__is_utf8_FOO(pTHX_ U8 classnum, const U8 * const p, const char * const name, const char * const alternative, const bool use_utf8, const bool use_locale, const char * const file, const unsigned line)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT__IS_UTF8_FOO  \
-       assert(p)
+       assert(p); assert(name); assert(alternative); assert(file)
+
+PERL_CALLCONV bool     Perl__is_utf8_FOO_with_len(pTHX_ const U8 classnum, const U8 *p, const U8 * const e)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT__IS_UTF8_FOO_WITH_LEN \
+       assert(p); assert(e)
 
 PERL_CALLCONV bool     Perl__is_utf8_idcont(pTHX_ const U8 *p)
                        __attribute__warn_unused_result__;
@@ -71,15 +79,15 @@ PERL_CALLCONV bool  Perl__is_utf8_mark(pTHX_ const U8 *p)
 #define PERL_ARGS_ASSERT__IS_UTF8_MARK \
        assert(p)
 
-PERL_CALLCONV bool     Perl__is_utf8_perl_idcont(pTHX_ const U8 *p)
+PERL_CALLCONV bool     Perl__is_utf8_perl_idcont_with_len(pTHX_ const U8 *p, const U8 * const e)
                        __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT__IS_UTF8_PERL_IDCONT  \
-       assert(p)
+#define PERL_ARGS_ASSERT__IS_UTF8_PERL_IDCONT_WITH_LEN \
+       assert(p); assert(e)
 
-PERL_CALLCONV bool     Perl__is_utf8_perl_idstart(pTHX_ const U8 *p)
+PERL_CALLCONV bool     Perl__is_utf8_perl_idstart_with_len(pTHX_ const U8 *p, const U8 * const e)
                        __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT__IS_UTF8_PERL_IDSTART \
-       assert(p)
+#define PERL_ARGS_ASSERT__IS_UTF8_PERL_IDSTART_WITH_LEN        \
+       assert(p); assert(e)
 
 PERL_CALLCONV bool     Perl__is_utf8_xidcont(pTHX_ const U8 *p)
                        __attribute__warn_unused_result__;
@@ -94,18 +102,18 @@ PERL_CALLCONV bool Perl__is_utf8_xidstart(pTHX_ const U8 *p)
 PERL_CALLCONV UV       Perl__to_uni_fold_flags(pTHX_ UV c, U8 *p, STRLEN *lenp, U8 flags);
 #define PERL_ARGS_ASSERT__TO_UNI_FOLD_FLAGS    \
        assert(p); assert(lenp)
-PERL_CALLCONV UV       Perl__to_utf8_fold_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, U8 flags);
+PERL_CALLCONV UV       Perl__to_utf8_fold_flags(pTHX_ const U8 *p, const U8 *e, U8* ustrp, STRLEN *lenp, U8 flags, const char * const file, const int line);
 #define PERL_ARGS_ASSERT__TO_UTF8_FOLD_FLAGS   \
-       assert(p); assert(ustrp)
-PERL_CALLCONV UV       Perl__to_utf8_lower_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, bool flags);
+       assert(p); assert(ustrp); assert(file)
+PERL_CALLCONV UV       Perl__to_utf8_lower_flags(pTHX_ const U8 *p, const U8* e, U8* ustrp, STRLEN *lenp, bool flags, const char * const file, const int line);
 #define PERL_ARGS_ASSERT__TO_UTF8_LOWER_FLAGS  \
-       assert(p); assert(ustrp)
-PERL_CALLCONV UV       Perl__to_utf8_title_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, bool flags);
+       assert(p); assert(ustrp); assert(file)
+PERL_CALLCONV UV       Perl__to_utf8_title_flags(pTHX_ const U8 *p, const U8* e, U8* ustrp, STRLEN *lenp, bool flags, const char * const file, const int line);
 #define PERL_ARGS_ASSERT__TO_UTF8_TITLE_FLAGS  \
-       assert(p); assert(ustrp)
-PERL_CALLCONV UV       Perl__to_utf8_upper_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, bool flags);
+       assert(p); assert(ustrp); assert(file)
+PERL_CALLCONV UV       Perl__to_utf8_upper_flags(pTHX_ const U8 *p, const U8 *e, U8* ustrp, STRLEN *lenp, bool flags, const char * const file, const int line);
 #define PERL_ARGS_ASSERT__TO_UTF8_UPPER_FLAGS  \
-       assert(p); assert(ustrp)
+       assert(p); assert(ustrp); assert(file)
 PERL_CALLCONV void     Perl__warn_problematic_locale(void);
 PERL_CALLCONV LOGOP*   Perl_alloc_LOGOP(pTHX_ I32 type, OP *first, OP *other);
 PERL_CALLCONV PADOFFSET        Perl_allocmy(pTHX_ const char *const name, const STRLEN len, const U32 flags);
@@ -521,8 +529,14 @@ PERL_CALLCONV void Perl_ck_warner_d(pTHX_ U32 err, const char* pat, ...)
 #define PERL_ARGS_ASSERT_CK_WARNER_D   \
        assert(pat)
 
-PERL_CALLCONV bool     Perl_ckwarn(pTHX_ U32 w);
-PERL_CALLCONV bool     Perl_ckwarn_d(pTHX_ U32 w);
+PERL_CALLCONV bool     Perl_ckwarn(pTHX_ U32 w)
+                       __attribute__warn_unused_result__
+                       __attribute__pure__;
+
+PERL_CALLCONV bool     Perl_ckwarn_d(pTHX_ U32 w)
+                       __attribute__warn_unused_result__
+                       __attribute__pure__;
+
 PERL_CALLCONV void     Perl_clear_defarray(pTHX_ AV* av, bool abandon);
 #define PERL_ARGS_ASSERT_CLEAR_DEFARRAY        \
        assert(av)
@@ -591,10 +605,7 @@ PERL_CALLCONV const char * Perl_custom_op_name(pTHX_ const OP *o)
 PERL_CALLCONV void     Perl_custom_op_register(pTHX_ Perl_ppaddr_t ppaddr, const XOP *xop);
 #define PERL_ARGS_ASSERT_CUSTOM_OP_REGISTER    \
        assert(ppaddr); assert(xop)
-/* PERL_CALLCONV const XOP *   Perl_custom_op_xop(pTHX_ const OP *o)
-                       __attribute__warn_unused_result__
-                       __attribute__pure__; */
-
+/* PERL_CALLCONV const XOP *   Perl_custom_op_xop(pTHX_ const OP *o); */
 PERL_CALLCONV void     Perl_cv_ckproto_len_flags(pTHX_ const CV* cv, const GV* gv, const char* p, const STRLEN len, const U32 flags);
 #define PERL_ARGS_ASSERT_CV_CKPROTO_LEN_FLAGS  \
        assert(cv)
@@ -1284,8 +1295,14 @@ PERL_CALLCONV SV**       Perl_hv_store_flags(pTHX_ HV *hv, const char *key, I32 klen,
 #endif
 /* PERL_CALLCONV void  hv_undef(pTHX_ HV *hv); */
 PERL_CALLCONV void     Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags);
-/* PERL_CALLCONV I32   ibcmp(pTHX_ const char* a, const char* b, I32 len); */
-/* PERL_CALLCONV I32   ibcmp_locale(pTHX_ const char* a, const char* b, I32 len); */
+/* PERL_CALLCONV I32   ibcmp(pTHX_ const char* a, const char* b, I32 len)
+                       __attribute__warn_unused_result__
+                       __attribute__pure__; */
+
+/* PERL_CALLCONV I32   ibcmp_locale(pTHX_ const char* a, const char* b, I32 len)
+                       __attribute__warn_unused_result__
+                       __attribute__pure__; */
+
 /* PERL_CALLCONV I32   ibcmp_utf8(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2); */
 PERL_CALLCONV void     Perl_init_argv_symbols(pTHX_ int argc, char **argv);
 #define PERL_ARGS_ASSERT_INIT_ARGV_SYMBOLS     \
@@ -1668,7 +1685,10 @@ PERL_CALLCONV bool       Perl_is_utf8_xidfirst(pTHX_ const U8 *p)
 #define PERL_ARGS_ASSERT_IS_UTF8_XIDFIRST      \
        assert(p)
 
-PERL_CALLCONV bool     Perl_isinfnan(NV nv);
+PERL_CALLCONV bool     Perl_isinfnan(NV nv)
+                       __attribute__warn_unused_result__
+                       __attribute__pure__;
+
 PERL_CALLCONV bool     Perl_isinfnansv(pTHX_ SV *sv);
 #define PERL_ARGS_ASSERT_ISINFNANSV    \
        assert(sv)
@@ -2311,6 +2331,7 @@ PERL_CALLCONV_NO_RET void Perl_noperl_die(const char* pat, ...)
        assert(pat)
 
 PERL_CALLCONV int      Perl_nothreadhook(pTHX);
+PERL_CALLCONV void     Perl_notify_parser_that_changed_to_utf8(pTHX);
 PERL_CALLCONV OP*      Perl_oopsAV(pTHX_ OP* o)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_OOPSAV        \
@@ -2323,6 +2344,7 @@ PERL_CALLCONV OP* Perl_oopsHV(pTHX_ OP* o)
 
 PERL_CALLCONV OP*      Perl_op_append_elem(pTHX_ I32 optype, OP* first, OP* last);
 PERL_CALLCONV OP*      Perl_op_append_list(pTHX_ I32 optype, OP* first, OP* last);
+PERL_CALLCONV OPclass  Perl_op_class(pTHX_ const OP *o);
 PERL_CALLCONV void     Perl_op_clear(pTHX_ OP* o);
 #define PERL_ARGS_ASSERT_OP_CLEAR      \
        assert(o)
@@ -3054,8 +3076,6 @@ PERL_CALLCONV bool        Perl_sv_does_sv(pTHX_ SV* sv, SV* namesv, U32 flags)
        assert(sv); assert(namesv)
 
 PERL_CALLCONV void     Perl_sv_dump(pTHX_ SV* sv);
-#define PERL_ARGS_ASSERT_SV_DUMP       \
-       assert(sv)
 /* PERL_CALLCONV I32   sv_eq(pTHX_ SV* sv1, SV* sv2); */
 PERL_CALLCONV I32      Perl_sv_eq_flags(pTHX_ SV* sv1, SV* sv2, const U32 flags);
 #ifndef NO_MATHOMS
@@ -3071,12 +3091,9 @@ PERL_CALLCONV void       Perl_sv_free2(pTHX_ SV *const sv, const U32 refcnt);
 #define PERL_ARGS_ASSERT_SV_FREE2      \
        assert(sv)
 PERL_CALLCONV void     Perl_sv_free_arenas(pTHX);
-PERL_CALLCONV SV*      Perl_sv_get_backrefs(SV *const sv)
-                       __attribute__warn_unused_result__
-                       __attribute__pure__;
+PERL_CALLCONV SV*      Perl_sv_get_backrefs(SV *const sv);
 #define PERL_ARGS_ASSERT_SV_GET_BACKREFS       \
        assert(sv)
-
 PERL_CALLCONV char*    Perl_sv_gets(pTHX_ SV *const sv, PerlIO *const fp, I32 append);
 #define PERL_ARGS_ASSERT_SV_GETS       \
        assert(sv); assert(fp)
@@ -3447,25 +3464,33 @@ PERL_CALLCONV UV        Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, S
        assert(p); assert(ustrp); assert(swashp); assert(normal)
 
 #ifndef NO_MATHOMS
-PERL_CALLCONV UV       Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp);
+PERL_CALLCONV UV       Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
+                       __attribute__deprecated__;
 #define PERL_ARGS_ASSERT_TO_UTF8_FOLD  \
        assert(p); assert(ustrp)
 #endif
+
 #ifndef NO_MATHOMS
-PERL_CALLCONV UV       Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp);
+PERL_CALLCONV UV       Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
+                       __attribute__deprecated__;
 #define PERL_ARGS_ASSERT_TO_UTF8_LOWER \
        assert(p); assert(ustrp)
 #endif
+
 #ifndef NO_MATHOMS
-PERL_CALLCONV UV       Perl_to_utf8_title(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp);
+PERL_CALLCONV UV       Perl_to_utf8_title(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
+                       __attribute__deprecated__;
 #define PERL_ARGS_ASSERT_TO_UTF8_TITLE \
        assert(p); assert(ustrp)
 #endif
+
 #ifndef NO_MATHOMS
-PERL_CALLCONV UV       Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp);
+PERL_CALLCONV UV       Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
+                       __attribute__deprecated__;
 #define PERL_ARGS_ASSERT_TO_UTF8_UPPER \
        assert(p); assert(ustrp)
 #endif
+
 PERL_CALLCONV bool     Perl_try_amagic_bin(pTHX_ int method, int flags);
 PERL_CALLCONV bool     Perl_try_amagic_un(pTHX_ int method, int flags);
 PERL_CALLCONV I32      Perl_unpack_str(pTHX_ const char *pat, const char *patend, const char *s, const char *strbeg, const char *strend, char **new_s, I32 ocnt, U32 flags);
@@ -3524,7 +3549,9 @@ PERL_CALLCONV UV  Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
 #define PERL_ARGS_ASSERT_UTF8_TO_UVCHR \
        assert(s)
 
-/* PERL_CALLCONV UV    utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen); */
+PERL_CALLCONV UV       Perl_utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen);
+#define PERL_ARGS_ASSERT_UTF8_TO_UVCHR_BUF     \
+       assert(s); assert(send)
 PERL_CALLCONV UV       Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
                        __attribute__deprecated__;
 #define PERL_ARGS_ASSERT_UTF8_TO_UVUNI \
@@ -3549,7 +3576,7 @@ PERL_CALLCONV void        Perl_utilize(pTHX_ int aver, I32 floor, OP* version, OP* idop
        assert(idop)
 /* PERL_CALLCONV U8*   uvchr_to_utf8(pTHX_ U8 *d, UV uv); */
 /* PERL_CALLCONV U8*   uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags); */
-PERL_CALLCONV U8*      Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags);
+PERL_CALLCONV U8*      Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, const UV flags);
 #define PERL_ARGS_ASSERT_UVOFFUNI_TO_UTF8_FLAGS        \
        assert(d)
 PERL_CALLCONV U8*      Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv);
@@ -4532,7 +4559,7 @@ STATIC void       S_finalize_op(pTHX_ OP* o);
 STATIC void    S_find_and_forget_pmops(pTHX_ OP *o);
 #define PERL_ARGS_ASSERT_FIND_AND_FORGET_PMOPS \
        assert(o)
-STATIC OP*     S_fold_constants(pTHX_ OP *o);
+STATIC OP*     S_fold_constants(pTHX_ OP * const o);
 #define PERL_ARGS_ASSERT_FOLD_CONSTANTS        \
        assert(o)
 STATIC OP*     S_force_list(pTHX_ OP* arg, bool nullit);
@@ -5016,9 +5043,9 @@ STATIC regnode*   S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 dept
 STATIC unsigned int    S_regex_set_precedence(const U8 my_operator)
                        __attribute__warn_unused_result__;
 
-STATIC void    S_reginsert(pTHX_ RExC_state_t *pRExC_state, U8 op, regnode *opnd, U32 depth);
+STATIC void    S_reginsert(pTHX_ RExC_state_t *pRExC_state, U8 op, regnode *operand, U32 depth);
 #define PERL_ARGS_ASSERT_REGINSERT     \
-       assert(pRExC_state); assert(opnd)
+       assert(pRExC_state); assert(operand)
 STATIC regnode*        S_regnode_guts(pTHX_ RExC_state_t *pRExC_state, const U8 op, const STRLEN extra_len, const char* const name);
 #define PERL_ARGS_ASSERT_REGNODE_GUTS  \
        assert(pRExC_state); assert(name)
@@ -5249,9 +5276,6 @@ STATIC char*      S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, cons
 #define PERL_ARGS_ASSERT_FIND_BYCLASS  \
        assert(prog); assert(c); assert(s); assert(strend)
 
-STATIC bool    S_isFOO_lc(pTHX_ const U8 classnum, const U8 character)
-                       __attribute__warn_unused_result__;
-
 STATIC bool    S_isFOO_utf8_lc(pTHX_ const U8 classnum, const U8* character)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_ISFOO_UTF8_LC \
@@ -5333,6 +5357,18 @@ STATIC void      S_to_utf8_substr(pTHX_ regexp * prog);
 #define PERL_ARGS_ASSERT_TO_UTF8_SUBSTR        \
        assert(prog)
 #endif
+#if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C)
+PERL_CALLCONV bool     Perl__is_grapheme(pTHX_ const U8 * strbeg, const U8 * s, const U8 *strend, const UV cp)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT__IS_GRAPHEME  \
+       assert(strbeg); assert(s); assert(strend)
+
+#endif
+#if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
+PERL_CALLCONV bool     Perl_isFOO_lc(pTHX_ const U8 classnum, const U8 character)
+                       __attribute__warn_unused_result__;
+
+#endif
 #if defined(PERL_IN_SCOPE_C)
 STATIC void    S_save_pushptri32ptr(pTHX_ void *const ptr1, const I32 i, void *const ptr2, const int type);
 STATIC SV*     S_save_scalar_at(pTHX_ SV **sptr, const U32 flags);
@@ -5472,7 +5508,7 @@ STATIC char*      S_force_version(pTHX_ char *s, int guessing);
 STATIC char*   S_force_word(pTHX_ char *start, int token, int check_keyword, int allow_pack);
 #define PERL_ARGS_ASSERT_FORCE_WORD    \
        assert(start)
-PERL_STATIC_INLINE SV* S_get_and_check_backslash_N_name(pTHX_ const char* s, const char* const e)
+STATIC SV*     S_get_and_check_backslash_N_name(pTHX_ const char* s, const char* const e)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_GET_AND_CHECK_BACKSLASH_N_NAME        \
        assert(s); assert(e)
@@ -5592,6 +5628,9 @@ STATIC char *     S__byte_dump_string(pTHX_ const U8 * s, const STRLEN len);
 STATIC UV      S__to_utf8_case(pTHX_ const UV uv1, const U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, const char *normal, const char *special);
 #define PERL_ARGS_ASSERT__TO_UTF8_CASE \
        assert(p); assert(ustrp); assert(swashp); assert(normal)
+STATIC U32     S_check_and_deprecate(pTHX_ const U8 * p, const U8 ** e, const unsigned type, const bool use_locale, const char * const file, const unsigned line);
+#define PERL_ARGS_ASSERT_CHECK_AND_DEPRECATE   \
+       assert(p); assert(e); assert(file)
 STATIC UV      S_check_locale_boundary_crossing(pTHX_ const U8* const p, const UV result, U8* const ustrp, STRLEN *lenp)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_CHECK_LOCALE_BOUNDARY_CROSSING        \
@@ -5612,6 +5651,11 @@ PERL_STATIC_INLINE bool  S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, co
 #define PERL_ARGS_ASSERT_IS_UTF8_COMMON        \
        assert(p); assert(swash); assert(swashname)
 
+PERL_STATIC_INLINE bool        S_is_utf8_common_with_len(pTHX_ const U8 *const p, const U8 *const e, SV **swash, const char * const swashname, SV* const invlist)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_IS_UTF8_COMMON_WITH_LEN       \
+       assert(p); assert(e); assert(swash); assert(swashname)
+
 PERL_STATIC_INLINE bool        S_is_utf8_cp_above_31_bits(const U8 * const s, const U8 * const e)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_IS_UTF8_CP_ABOVE_31_BITS      \
@@ -5632,7 +5676,7 @@ STATIC SV*        S_swatch_get(pTHX_ SV* swash, UV start, UV span)
 #define PERL_ARGS_ASSERT_SWATCH_GET    \
        assert(swash)
 
-STATIC U8      S_to_lower_latin1(const U8 c, U8 *p, STRLEN *lenp)
+STATIC U8      S_to_lower_latin1(const U8 c, U8 *p, STRLEN *lenp, const char dummy)
                        __attribute__warn_unused_result__;
 
 STATIC char *  S_unexpected_non_continuation_text(pTHX_ const U8 * const s, STRLEN print_len, const STRLEN non_cont_byte_pos, const STRLEN expect_len)
@@ -5640,6 +5684,9 @@ STATIC char *     S_unexpected_non_continuation_text(pTHX_ const U8 * const s, STRLE
 #define PERL_ARGS_ASSERT_UNEXPECTED_NON_CONTINUATION_TEXT      \
        assert(s)
 
+STATIC void    S_warn_on_first_deprecated_use(pTHX_ const char * const name, const char * const alternative, const bool use_locale, const char * const file, const unsigned line);
+#define PERL_ARGS_ASSERT_WARN_ON_FIRST_DEPRECATED_USE  \
+       assert(name); assert(alternative); assert(file)
 #endif
 #if defined(PERL_IN_UTF8_C) || defined(PERL_IN_PP_C)
 PERL_CALLCONV UV       Perl__to_upper_title_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const char S_or_s);