[Pyrex] gcc's -fstrict-aliasing optimization can break vtable construction in PyMODINIT_FUNC

Dan Gindikin dg at pnylab.com
Sat Nov 24 18:45:21 CET 2007


Lenard Lindstrom:
> The problem is more complicated than strict aliasing.
> The C compiler complains but the d.F() method call works  correctly.

What gcc complaints were you seeing?

I too have seen this problem go away with other optimization flag sets, 
but I thought and still think it most likely, that it's about the 
aliasing. I think different optimization settings cause this particular 
re-ordering of writes  to happen or not happen.

You could easily be right of course, the story may not be as simple as that.

Dan




More information about the Pyrex mailing list