Message155451
| 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*)█ |
|