diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2019-02-15 11:15:03 +0000 |
---|---|---|
committer | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2019-02-15 11:23:35 +0000 |
commit | de8aedb225e5852b32ab9143c1cc234e65af26ba (patch) | |
tree | 3ffab06fdc85f2019d214c346895acda7d7343a0 | |
parent | be76079c87db438e1123ff79ee161badcb258605 (diff) | |
download | perl-de8aedb225e5852b32ab9143c1cc234e65af26ba.tar.gz |
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.
-rw-r--r-- | regcomp.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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]) |