[M3devel] another size/alignment/interop problem..
Rodney M. Bates
rodney_bates at lcwb.coop
Mon Sep 2 00:07:31 CEST 2013
On 08/31/2013 10:05 PM, Jay K wrote:
> TYPE FILETIME = RECORD
> dwLowDateTime : uint32_t;
> dwHighDateTime: uint32_t;
> END;
>
> BY_HANDLE_FILE_INFORMATION = RECORD
> dwFileAttributes : uint32_t;
> ftCreationTime : FILETIME; (* This should be at offset 4 but is 8 on 64bit systems. *)
> (* the rest omitted *)
> END;
>
>
> Why doesn't that just work?
The only explanation I can think of is that the compiler gave record type FILETIME
64-bit alignment. As far as I know, there is nothing in the language that says it
is not perfectly within its rights to do so. Why is another question.
> It works with:
> TYPE FILETIME = BITS 64 FOR RECORD
>
Which is consistent with the language, if it doesn't refuse altogether.
>
> but imho it should work without that.
>
>
> - Jay
>
>
More information about the M3devel
mailing list