[issue14249] unicodeobject.c: aliasing warnings
Serhiy Storchaka
report at bugs.python.org
Thu Apr 5 21:46:23 CEST 2012
Serhiy Storchaka <storchaka at gmail.com> added the comment:
What compiler are you using? With gcc 4.4 on 32-bit Linux netbook I get:
unpatched union shift
utf-16le " "*10000 129 126 109
utf-16le "\u263A"*10000 208 203 160
utf-16be " "*10000 153 147 114
utf-16be "\u263A"*10000 226 227 167
The difference is that for shift the compiler stores block in register, and for the union the compiler stores block in memory, so that it can get address. May be more recent compilers learned to do this more effectively?
Besides, shifts are more pronounced for CPython code, searching shows very few uses of union in the source code.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14249>
_______________________________________
More information about the Python-bugs-list
mailing list