@@ -3484,9 +3484,9 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
34843484 bool is_logical = 0, is_optimistic = 0;
34853485 const char * const seqstart = RExC_parse;
34863486 const char * endptr;
3487- const char non_existent_group_msg[]
3487+ const char * const non_existent_group_msg
34883488 = "Reference to nonexistent group";
3489- const char impossible_group[] = "Invalid reference to group";
3489+ const char * const impossible_group = "Invalid reference to group";
34903490
34913491 if (has_intervening_patws) {
34923492 RExC_parse_inc_by(1);
@@ -4476,7 +4476,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
44764476 {
44774477 const char *p;
44784478 /* Even/odd or x = don't care: 010101x10x */
4479- static const char parens[] = "=!aA<,>Bbt";
4479+ const char * const parens = "=!aA<,>Bbt";
44804480 /* flag below is set to 0 up through 'A'; 1 for larger */
44814481
44824482 if (paren && (p = strchr(parens, paren))) {
@@ -8350,7 +8350,7 @@ S_handle_possible_posix(pTHX_ RExC_state_t *pRExC_state,
83508350 * was, but there was a typo. We tease these apart by doing fuzzy
83518351 * matching on the name */
83528352 if (class_number == OOB_NAMEDCLASS && found_problem) {
8353- const UV posix_names[][6] = {
8353+ static const UV posix_names[][6] = {
83548354 { 'a', 'l', 'n', 'u', 'm' },
83558355 { 'a', 'l', 'p', 'h', 'a' },
83568356 { 'a', 's', 'c', 'i', 'i' },
@@ -8368,7 +8368,7 @@ S_handle_possible_posix(pTHX_ RExC_state_t *pRExC_state,
83688368 };
83698369 /* The names of the above all have added NULs to make them the same
83708370 * size, so we need to also have the real lengths */
8371- const UV posix_name_lengths[] = {
8371+ static const UV posix_name_lengths[] = {
83728372 sizeof("alnum") - 1,
83738373 sizeof("alpha") - 1,
83748374 sizeof("ascii") - 1,
@@ -14247,7 +14247,7 @@ S_handle_user_defined_property(pTHX_
1424714247
1424814248 const char * s0 = string; /* Points to first byte in the current line
1424914249 being parsed in 'string' */
14250- const char overflow_msg[] = "Code point too large in \"";
14250+ const char * const overflow_msg = "Code point too large in \"";
1425114251 SV* running_definition = NULL;
1425214252
1425314253 PERL_ARGS_ASSERT_HANDLE_USER_DEFINED_PROPERTY;
@@ -15332,7 +15332,7 @@ S_parse_uniprop_string(pTHX_
1533215332 /* Drop down to look up in the official properties */
1533315333 }
1533415334 else {
15335- const char insecure[] = "Insecure user-defined property";
15335+ const char * const insecure = "Insecure user-defined property";
1533615336
1533715337 /* Here, there is a sub by the correct name. Normally we call it
1533815338 * to get the property definition */
@@ -15357,7 +15357,7 @@ S_parse_uniprop_string(pTHX_
1535715357 * error instead */
1535815358 if (TAINT_get) {
1535915359 if (SvCUR(msg) > 0) sv_catpvs(msg, "; ");
15360- sv_catpvn(msg, insecure, sizeof (insecure) - 1 );
15360+ sv_catpvn(msg, insecure, strlen (insecure));
1536115361 goto append_name_to_msg;
1536215362 }
1536315363
@@ -15545,7 +15545,7 @@ S_parse_uniprop_string(pTHX_
1554515545 }
1554615546 if (TAINT_get) {
1554715547 if (SvTRUE(error)) sv_catpvs(msg, "; ");
15548- sv_catpvn(msg, insecure, sizeof (insecure) - 1 );
15548+ sv_catpvn(msg, insecure, strlen (insecure));
1554915549 }
1555015550
1555115551 if (name_len > 0) {
@@ -16033,8 +16033,8 @@ S_handle_names_wildcard(pTHX_ const char * wname, /* wildcard name to match */
1603316033 const char * must; /* The PV of 'must' */
1603416034 STRLEN must_len; /* And its length */
1603516035 SV * syllable_name = NULL; /* For Hangul syllables */
16036- const char hangul_prefix[] = "HANGUL SYLLABLE ";
16037- const STRLEN hangul_prefix_len = sizeof (hangul_prefix) - 1 ;
16036+ const char * const hangul_prefix = "HANGUL SYLLABLE ";
16037+ const STRLEN hangul_prefix_len = strlen (hangul_prefix);
1603816038
1603916039 /* By inspection, there are a maximum of 7 bytes in the suffix of a hangul
1604016040 * syllable name, and these are immutable and guaranteed by the Unicode
@@ -16267,20 +16267,20 @@ S_handle_names_wildcard(pTHX_ const char * wname, /* wildcard name to match */
1626716267 /* These constants, names, values, and algorithm are adapted from the
1626816268 * Unicode standard, version 5.1, section 3.12, and should never
1626916269 * change. */
16270- const char * JamoL[] = {
16270+ static const char * const JamoL[] = {
1627116271 "G", "GG", "N", "D", "DD", "R", "M", "B", "BB",
1627216272 "S", "SS", "", "J", "JJ", "C", "K", "T", "P", "H"
1627316273 };
1627416274 const int LCount = C_ARRAY_LENGTH(JamoL);
1627516275
16276- const char * JamoV[] = {
16276+ static const char * const JamoV[] = {
1627716277 "A", "AE", "YA", "YAE", "EO", "E", "YEO", "YE", "O", "WA",
1627816278 "WAE", "OE", "YO", "U", "WEO", "WE", "WI", "YU", "EU", "YI",
1627916279 "I"
1628016280 };
1628116281 const int VCount = C_ARRAY_LENGTH(JamoV);
1628216282
16283- const char * JamoT[] = {
16283+ static const char * const JamoT[] = {
1628416284 "", "G", "GG", "GS", "N", "NJ", "NH", "D", "L",
1628516285 "LG", "LM", "LB", "LS", "LT", "LP", "LH", "M", "B",
1628616286 "BS", "S", "SS", "NG", "J", "C", "K", "T", "P", "H"
@@ -16415,7 +16415,7 @@ S_handle_names_wildcard(pTHX_ const char * wname, /* wildcard name to match */
1641516415 /* If we ever were to accept aliases for, say private use names, we would
1641616416 * need to do something fancier to find empty names. The code below works
1641716417 * (at the time it was written), and is slower than the above */
16418- const char empties_pat[] = "^.";
16418+ const char * const empties_pat = "^.";
1641916419 if (strNE(name, empties_pat)) {
1642016420 SV * empty = newSVpvs("");
1642116421 if (execute_wildcard(subpattern_re,
0 commit comments