summaryrefslogtreecommitdiff
path: root/regexp.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 /regexp.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 'regexp.h')
-rw-r--r--regexp.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/regexp.h b/regexp.h
index 7622d6706a..ff16410684 100644
--- a/regexp.h
+++ b/regexp.h
@@ -391,37 +391,38 @@ and check for NULL.
#define RXf_BASE_SHIFT (_RXf_PMf_SHIFT_NEXT + 4)
/* What we have seen */
-#define RXf_NO_INPLACE_SUBST (1<<(RXf_BASE_SHIFT+2))
-#define RXf_EVAL_SEEN (1<<(RXf_BASE_SHIFT+3))
+#define RXf_NO_INPLACE_SUBST (1U<<(RXf_BASE_SHIFT+2))
+#define RXf_EVAL_SEEN (1U<<(RXf_BASE_SHIFT+3))
/* Special */
-#define RXf_UNBOUNDED_QUANTIFIER_SEEN (1<<(RXf_BASE_SHIFT+4))
-#define RXf_CHECK_ALL (1<<(RXf_BASE_SHIFT+5))
+#define RXf_UNBOUNDED_QUANTIFIER_SEEN (1U<<(RXf_BASE_SHIFT+4))
+#define RXf_CHECK_ALL (1U<<(RXf_BASE_SHIFT+5))
/* UTF8 related */
-#define RXf_MATCH_UTF8 (1<<(RXf_BASE_SHIFT+6)) /* $1 etc are utf8 */
+#define RXf_MATCH_UTF8 (1U<<(RXf_BASE_SHIFT+6)) /* $1 etc are utf8 */
/* Intuit related */
-#define RXf_USE_INTUIT_NOML (1<<(RXf_BASE_SHIFT+7))
-#define RXf_USE_INTUIT_ML (1<<(RXf_BASE_SHIFT+8))
-#define RXf_INTUIT_TAIL (1<<(RXf_BASE_SHIFT+9))
+#define RXf_USE_INTUIT_NOML (1U<<(RXf_BASE_SHIFT+7))
+#define RXf_USE_INTUIT_ML (1U<<(RXf_BASE_SHIFT+8))
+#define RXf_INTUIT_TAIL (1U<<(RXf_BASE_SHIFT+9))
#define RXf_USE_INTUIT (RXf_USE_INTUIT_NOML|RXf_USE_INTUIT_ML)
/* Do we have some sort of anchor? */
-#define RXf_IS_ANCHORED (1<<(RXf_BASE_SHIFT+10))
+#define RXf_IS_ANCHORED (1U<<(RXf_BASE_SHIFT+10))
/* Copy and tainted info */
-#define RXf_COPY_DONE (1<<(RXf_BASE_SHIFT+11))
+#define RXf_COPY_DONE (1U<<(RXf_BASE_SHIFT+11))
/* post-execution: $1 et al are tainted */
-#define RXf_TAINTED_SEEN (1<<(RXf_BASE_SHIFT+12))
+#define RXf_TAINTED_SEEN (1U<<(RXf_BASE_SHIFT+12))
/* this pattern was tainted during compilation */
-#define RXf_TAINTED (1<<(RXf_BASE_SHIFT+13))
+#define RXf_TAINTED (1U<<(RXf_BASE_SHIFT+13))
/* Flags indicating special patterns */
-#define RXf_START_ONLY (1<<(RXf_BASE_SHIFT+14)) /* Pattern is /^/ */
-#define RXf_SKIPWHITE (1<<(RXf_BASE_SHIFT+15)) /* Pattern is for a split " " */
-#define RXf_WHITE (1<<(RXf_BASE_SHIFT+16)) /* Pattern is /\s+/ */
+#define RXf_START_ONLY (1U<<(RXf_BASE_SHIFT+14)) /* Pattern is /^/ */
+#define RXf_SKIPWHITE (1U<<(RXf_BASE_SHIFT+15)) /* Pattern is for a */
+ /* split " " */
+#define RXf_WHITE (1U<<(RXf_BASE_SHIFT+16)) /* Pattern is /\s+/ */
#define RXf_NULL (1U<<(RXf_BASE_SHIFT+17)) /* Pattern is // */
/* See comments at the beginning of these defines about adding bits. The