[issue21168] unicodeobject.c: likely type-punning may break strict-aliasing rules
STINNER Victor
report at bugs.python.org
Mon Apr 7 13:11:56 CEST 2014
STINNER Victor added the comment:
The warning comes from the make_bloom_mask() call below. make_bloom_mask() is called with kind=PyUnicode_2BYTE_KIND (Py_UCS2), whereas the gcc waring is about Py_UCS4. It looks like a false positive.
static BLOOM_MASK bloom_linebreak = ~(BLOOM_MASK)0;
...
Py_UCS2 linebreak[] = {
...
};
/* initialize the linebreak bloom filter */
bloom_linebreak = make_bloom_mask(
PyUnicode_2BYTE_KIND, linebreak,
Py_ARRAY_LENGTH(linebreak));
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21168>
_______________________________________
More information about the Python-bugs-list
mailing list