summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-09-21 22:07:58 -0600
committerKarl Williamson <khw@cpan.org>2014-09-29 11:07:40 -0600
commit9cba692be9578e72e0f03f616e61b7fa7a2fb79d (patch)
treede70242b397ac2d31ff1b6e14b9e970d5ee82810 /op.h
parentbb62883ea327df0c836748360635ed9394e2264c (diff)
downloadperl-9cba692be9578e72e0f03f616e61b7fa7a2fb79d.tar.gz
Suppress some Solaris warnings
We get an integer overflow message when we left shift a 1 into the highest bit of a word. This changes the 1's into 1U's to indicate unsigned. This is done for all the flag bits in the affected word, as they could get reorderd by someone in the future, unintentionally reintroducing this problem again.
Diffstat (limited to 'op.h')
-rw-r--r--op.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/op.h b/op.h
index 64825acd81..df39d33080 100644
--- a/op.h
+++ b/op.h
@@ -278,45 +278,45 @@ struct pmop {
#define PMf_BASE_SHIFT (_RXf_PMf_SHIFT_NEXT+4)
/* 'use re "taint"' in scope: taint $1 etc. if target tainted */
-#define PMf_RETAINT (1<<(PMf_BASE_SHIFT+5))
+#define PMf_RETAINT (1U<<(PMf_BASE_SHIFT+5))
/* match successfully only once per reset, with related flag RXf_USED in
* re->extflags holding state. This is used only for ?? matches, and only on
* OP_MATCH and OP_QR */
-#define PMf_ONCE (1<<(PMf_BASE_SHIFT+6))
+#define PMf_ONCE (1U<<(PMf_BASE_SHIFT+6))
/* PMf_ONCE, i.e. ?pat?, has matched successfully. Not used under threading. */
-#define PMf_USED (1<<(PMf_BASE_SHIFT+7))
+#define PMf_USED (1U<<(PMf_BASE_SHIFT+7))
/* subst replacement is constant */
-#define PMf_CONST (1<<(PMf_BASE_SHIFT+8))
+#define PMf_CONST (1U<<(PMf_BASE_SHIFT+8))
/* keep 1st runtime pattern forever */
-#define PMf_KEEP (1<<(PMf_BASE_SHIFT+9))
+#define PMf_KEEP (1U<<(PMf_BASE_SHIFT+9))
-#define PMf_GLOBAL (1<<(PMf_BASE_SHIFT+10)) /* pattern had a g modifier */
+#define PMf_GLOBAL (1U<<(PMf_BASE_SHIFT+10)) /* pattern had a g modifier */
/* don't reset pos() if //g fails */
-#define PMf_CONTINUE (1<<(PMf_BASE_SHIFT+11))
+#define PMf_CONTINUE (1U<<(PMf_BASE_SHIFT+11))
/* evaluating replacement as expr */
-#define PMf_EVAL (1<<(PMf_BASE_SHIFT+12))
+#define PMf_EVAL (1U<<(PMf_BASE_SHIFT+12))
/* Return substituted string instead of modifying it. */
-#define PMf_NONDESTRUCT (1<<(PMf_BASE_SHIFT+13))
+#define PMf_NONDESTRUCT (1U<<(PMf_BASE_SHIFT+13))
/* the pattern has a CV attached (currently only under qr/...(?{}).../) */
-#define PMf_HAS_CV (1<<(PMf_BASE_SHIFT+14))
+#define PMf_HAS_CV (1U<<(PMf_BASE_SHIFT+14))
/* op_code_list is private; don't free it etc. It may well point to
* code within another sub, with different pad etc */
-#define PMf_CODELIST_PRIVATE (1<<(PMf_BASE_SHIFT+15))
+#define PMf_CODELIST_PRIVATE (1U<<(PMf_BASE_SHIFT+15))
/* the PMOP is a QR (we should be able to detect that from the op type,
* but the regex compilation API passes just the pm flags, not the op
* itself */
-#define PMf_IS_QR (1<<(PMf_BASE_SHIFT+16))
-#define PMf_USE_RE_EVAL (1<<(PMf_BASE_SHIFT+17)) /* use re'eval' in scope */
+#define PMf_IS_QR (1U<<(PMf_BASE_SHIFT+16))
+#define PMf_USE_RE_EVAL (1U<<(PMf_BASE_SHIFT+17)) /* use re'eval' in scope */
/* See comments at the beginning of these defines about adding bits. The
* highest bit position should be used, so that if PMf_BASE_SHIFT gets