This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Output bad locale warning in regex synthetic start class
[perl5.git] / regcomp.c
index 982fdd1..9075fc5 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -1639,6 +1639,10 @@ S_ssc_finalize(pTHX_ RExC_state_t *pRExC_state, regnode_ssc *ssc)
         ANYOF_FLAGS(ssc) |= ANYOF_MATCHES_POSIXL;
     }
 
+    if (RExC_contains_locale) {
+        OP(ssc) = ANYOFL;
+    }
+
     assert(! (ANYOF_FLAGS(ssc) & ANYOF_LOCALE_FLAGS) || RExC_contains_locale);
 }