[Python-checkins] Fix strict-aliasing rules errors on gcc 4.8.5. (GH-16714)

Inada Naoki webhook-mailer at python.org
Fri Oct 11 04:43:19 EDT 2019


https://github.com/python/cpython/commit/c39d1ddc012987e2159a997e27665d2d579c0ce0
commit: c39d1ddc012987e2159a997e27665d2d579c0ce0
branch: master
author: Dong-hee Na <donghee.na92 at gmail.com>
committer: Inada Naoki <songofacandy at gmail.com>
date: 2019-10-11T17:43:11+09:00
summary:

Fix strict-aliasing rules errors on gcc 4.8.5. (GH-16714)

files:
M Objects/dictobject.c

diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 99908a8a375d2..b496350d47093 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -1133,7 +1133,7 @@ insert_to_emptydict(PyDictObject *mp, PyObject *key, Py_hash_t hash,
     MAINTAIN_TRACKING(mp, key, value);
 
     size_t hashpos = (size_t)hash & (PyDict_MINSIZE-1);
-    PyDictKeyEntry *ep = &DK_ENTRIES(mp->ma_keys)[0];
+    PyDictKeyEntry *ep = DK_ENTRIES(mp->ma_keys);
     dictkeys_set_index(mp->ma_keys, hashpos, 0);
     ep->me_key = key;
     ep->me_hash = hash;



More information about the Python-checkins mailing list