X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=regcomp.c;h=e06152820c304553b6d15e8d00750513a0d9f2c2;hb=261f6fe66fcb39f452edd0e67d52b9602e510c33;hp=3ad1f3b07d614b90fd387146fbcb10fa441de089;hpb=da7fcca4b8d6fb4dc88e0305bf9830bf24912ebd;p=p5sagit%2Fp5-mst-13.2.git diff --git a/regcomp.c b/regcomp.c index 3ad1f3b..e061528 100644 --- a/regcomp.c +++ b/regcomp.c @@ -7430,6 +7430,19 @@ tryagain: I32 flags = 0; STRLEN numlen = 3; ender = grok_oct(p, &numlen, &flags, NULL); + + /* An octal above 0xff is interpreted differently + * depending on if the re is in utf8 or not. If it + * is in utf8, the value will be itself, otherwise + * it is interpreted as modulo 0x100. It has been + * decided to discourage the use of octal above the + * single-byte range. For now, warn only when + * it ends up modulo */ + if (SIZE_ONLY && ender >= 0x100 + && ! UTF && ! PL_encoding + && ckWARN2(WARN_DEPRECATED, WARN_REGEXP)) { + vWARNdep(p, "Use of octal value above 377 is deprecated"); + } p += numlen; } else {