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 skrah
Recipients benjamin.peterson, skrah, vstinner
Date 2012-03-12.15:43:24
SpamBayes Score 6.567767e-06
Marked as misclassified No
Message-id <20120312154323.GA5920@sleipnir.bytereef.org>
In-reply-to <1331520454.11.0.297588427828.issue14249@psf.upfronthosting.co.za>
Content
Benjamin Peterson <report@bugs.python.org> wrote:
> gcc 4.5 doesn't warn for me. Is this a compiler bug in 4.4 or 4.5?
> That is, are these actual aliasing violations?

I see this with 4.4 but also with 4.6 when using -Wstrict-aliasing=2.
However, nothing bad happens when I compile with -fstrict-aliasing.

I think, but I would have to consult the standard again to be sure, that
technically this might be an aliasing violation in C99, since 'pblock' does
not have the type of 'block'.

     unsigned long block = * (unsigned long *) _q;
     unsigned short *pblock = (unsigned short*)&block;
History
Date User Action Args
2012-03-12 15:43:25skrahsetrecipients: + skrah, vstinner, benjamin.peterson
2012-03-12 15:43:24skrahlinkissue14249 messages
2012-03-12 15:43:24skrahcreate