[Python-Dev] mingw32 and gc-header weirdness

"Martin v. Löwis" martin at v.loewis.de
Wed Jul 22 21:55:24 CEST 2009


> Is that considered a mingw bug?

Perhaps. I can't test right now: *if* VS has a long double type
that is smaller, it is apparently an ABI violation for mingw to
not follow VS. It appears that other people also consider it a
bug:

http://www.velocityreviews.com/forums/showpost.php?p=1514923&postcount=2

OTOH, they probably cannot change it without causing

> Should we change the above union to a safer construct?

No. tim_one changed it to be long double in r25454 to support some
system that Dave Abrahams uses, so it needs to stay that way :-)

However, we can certainly acknowledge that this is a bug in MingW,
and special case it. Either introduce a symbolic type gchead_align_t
which gets defined to just double on MingW, or put the #ifdef right
into the structure.

It might also be useful to assert that sizeof(gchead_align_t) is
8 or 16, and reject 12 as a value. The point is that we need the
maximum alignment, and that certainly shouldn't be 12.

Regards,
Martin



More information about the Python-Dev mailing list