summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-01-14 10:08:22 +0100
committerNikita Popov <nikita.ppv@gmail.com>2021-01-14 10:08:22 +0100
commit880bf6222415f5bb87a73bc830bfa98ef30c267a (patch)
treee247da0a1f4146f9b7cc646a3e1fbc8f65434b9c
parentf9fbba41b66e0e9ccd40ff064d00cfe987c2c5bb (diff)
downloadphp-git-880bf6222415f5bb87a73bc830bfa98ef30c267a.tar.gz
Fixed bug #80617: Type narrowing warning in ZEND_TYPE_INIT_CODE
-rw-r--r--NEWS2
-rw-r--r--Zend/zend_types.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index de07189a17..2f3baaf8fb 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,8 @@ PHP NEWS
Seitz, cmb)
. Fixed bug #80596 (Invalid union type TypeError in anonymous classes).
(Daniil Gentili)
+ . Fixed bug #80617 (GCC throws warning about type narrowing in
+ ZEND_TYPE_INIT_CODE). (Nikita)
- BCMath:
. Fixed bug #80545 (bcadd('a', 'a') doesn't throw an exception).
diff --git a/Zend/zend_types.h b/Zend/zend_types.h
index 3b1ec85452..82cf20f1b5 100644
--- a/Zend/zend_types.h
+++ b/Zend/zend_types.h
@@ -150,7 +150,7 @@ typedef struct {
/* Type mask excluding the flags above. */
#define _ZEND_TYPE_MAY_BE_MASK ((1u << 20) - 1)
/* Must have same value as MAY_BE_NULL */
-#define _ZEND_TYPE_NULLABLE_BIT 0x2
+#define _ZEND_TYPE_NULLABLE_BIT 0x2u
#define ZEND_TYPE_IS_SET(t) \
(((t).type_mask & _ZEND_TYPE_MASK) != 0)