This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Use static asserts when comparing sizeof() to a constant
[perl5.git]
/
regcomp.c
diff --git
a/regcomp.c
b/regcomp.c
index
53e24bb
..
781399e
100644
(file)
--- a/
regcomp.c
+++ b/
regcomp.c
@@
-7416,7
+7416,7
@@
S_set_regex_pv(pTHX_ RExC_state_t *pRExC_state, REGEXP *Rx)
PERL_ARGS_ASSERT_SET_REGEX_PV;
/* make sure PL_bitcount bounds not exceeded */
-
assert
(sizeof(STD_PAT_MODS) <= 8);
+
STATIC_ASSERT_STMT
(sizeof(STD_PAT_MODS) <= 8);
p = sv_grow(MUTABLE_SV(Rx), wraplen + 1); /* +1 for the ending NUL */
SvPOK_on(Rx);