This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Oleg.Plakhotnyuk, vstinner
Date 2011-10-21.19:53:18
SpamBayes Score 2.07044e-06
Marked as misclassified No
Message-id <1319226800.14.0.264732238507.issue13241@psf.upfronthosting.co.za>
In-reply-to
Content
It is a compiler bug in GCC 4.2.1 with -O3. Try to compile attached unicode.c program with gcc -O3. The correct result is:

$ gcc -O3 unicode.c -o unicode && ./unicode
is ascii? 0
is compact? 1
is compact ascii? 0
_PyUnicode_COMPACT_DATA: 88 vs 88
PyUnicode_DATA: 88 vs 88
explicit cast: 88 vs 88

With gcc 4.2.1 and -O3, you get "is compact ascii? 1".
History
Date User Action Args
2011-10-21 19:53:20vstinnersetrecipients: + vstinner, Oleg.Plakhotnyuk
2011-10-21 19:53:20vstinnersetmessageid: <1319226800.14.0.264732238507.issue13241@psf.upfronthosting.co.za>
2011-10-21 19:53:19vstinnerlinkissue13241 messages
2011-10-21 19:53:19vstinnercreate