summaryrefslogtreecommitdiff
path: root/op_reg_common.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2012-06-14 09:10:37 +0100
committerDavid Mitchell <davem@iabyn.com>2012-06-14 09:10:37 +0100
commitdb703679cab524f30dcaf14188afc73260ed21e7 (patch)
tree04e977259263b614960ef78b0a8fb32ba8280a4c /op_reg_common.h
parente128ab2c0803fa45e7f26de2941696d173a9a293 (diff)
downloadperl-db703679cab524f30dcaf14188afc73260ed21e7.tar.gz
silence picky C compiler warning
and add assert that a (U32 & mask) value can fit in a U8.
Diffstat (limited to 'op_reg_common.h')
-rw-r--r--op_reg_common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/op_reg_common.h b/op_reg_common.h
index 4e173504c5..f35cb7d233 100644
--- a/op_reg_common.h
+++ b/op_reg_common.h
@@ -85,6 +85,10 @@ get_regex_charset(const U32 flags)
* re->extflags during compilation */
#define RXf_PMf_COMPILETIME (RXf_PMf_MULTILINE|RXf_PMf_SINGLELINE|RXf_PMf_CHARSET|RXf_PMf_FOLD|RXf_PMf_EXTENDED|RXf_PMf_KEEPCOPY)
+#if RXf_PMf_COMPILETIME > 255
+# error RXf_PMf_COMPILETIME wont fit in U8 flags field of eval node
+#endif
+
/* These copies need to be numerical or defsubs_h.PL won't know about them. */
#define PMf_MULTILINE 1<<0
#define PMf_SINGLELINE 1<<1