diff options
author | Karl Williamson <khw@cpan.org> | 2015-02-05 13:07:38 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2015-02-05 13:54:23 -0700 |
commit | 7dbd4c448e073ab79489ffeb25479e30e283d84d (patch) | |
tree | 0b7822356d38ff4dd2e93c5501e2c956694e8cd2 /regcomp.c | |
parent | c9a74c77cc7250708801cd921a86741bdcbda6cd (diff) | |
download | perl-7dbd4c448e073ab79489ffeb25479e30e283d84d.tar.gz |
regcomp.c: Warn on [:^posix:] not being in []
A POSIX character class is has to be in a bracketed character class. A
warning is issued when something appearing to be one is found outside.
Until this commit the warning wasn't raised for negated classes.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -13864,6 +13864,9 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, const char *s = RExC_parse; const char c = *s++; + if (*s == '^') { + s++; + } while (isWORDCHAR(*s)) s++; if (*s && c == *s && s[1] == ']') { |