In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/de8aedb225e5852b32ab9143c1cc234e65af26ba?hp=be76079c87db438e1123ff79ee161badcb258605>
- Log ----------------------------------------------------------------- commit de8aedb225e5852b32ab9143c1cc234e65af26ba Author: Dagfinn Ilmari Mannsåker <[email protected]> Date: Fri Feb 15 11:15:03 2019 +0000 Use STATIC_ASSERT_STMT for checking compile-time invariants Better to have the build fail if they're wrong than relying on the code path being hit at runtime in a DEBUGGING build. ----------------------------------------------------------------------- Summary of changes: regcomp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/regcomp.c b/regcomp.c index 41d2582aad..088b1df7cd 100644 --- a/regcomp.c +++ b/regcomp.c @@ -18989,9 +18989,8 @@ Perl__get_regclass_nonbitmap_data(pTHX_ const regexp *prog, invlist = prop_definition; } - assert(ONLY_LOCALE_MATCHES_INDEX == 1 + INVLIST_INDEX); - assert(DEFERRED_USER_DEFINED_INDEX == 1 - + ONLY_LOCALE_MATCHES_INDEX); + STATIC_ASSERT_STMT(ONLY_LOCALE_MATCHES_INDEX == 1 + INVLIST_INDEX); + STATIC_ASSERT_STMT(DEFERRED_USER_DEFINED_INDEX == 1 + ONLY_LOCALE_MATCHES_INDEX); av_store(av, INVLIST_INDEX, invlist); av_fill(av, (ary[ONLY_LOCALE_MATCHES_INDEX]) -- Perl5 Master Repository
