"Hans Leidekker" hans@it.vu.nl wrote:
This time I tried to be exhaustive. I used the following algorithm to find all structures that need 8 byte alignment:
find all types typedef:ed to __int64 find all structures embedding any of the types found REPEAT find all types typedef:ed to any of the structures found find all structures embedding any of the structures or types found UNTIL no new types or structures are found
This patch includes changes to .idl files as well as to the corresponding .h files. Is that OK? Or should I remove changes to .h files?
I think that a correct way deciding whether a struct is correctly packed is to make sure that our generated tests for packing issues work under MSVC, then just compare the results. Otherwise we risk to miss something.
On Monday 03 May 2004 14:05, Dmitry Timoshkov wrote:
I think that a correct way deciding whether a struct is correctly packed is to make sure that our generated tests for packing issues work under MSVC, then just compare the results. Otherwise we risk to miss something.
Sure, but until my patch to winapi_test and the regeneration of the tests we weren't testing 8 byte alignments. Now we can, so anyone who has a recent MSVC is invited to build and run the generated tests ;-).
I see that Alexandre has put in a much better patch than mine that makes alignment default to 8 when it comes to 64 bit types, which is what MSVC does.
-Hans