[fpc-pascal] sizeof(Enumerated type in Delphi 5) <> sizeof(The same type in FPC)
Dennis Poon
dennis at avidsoft.com.hk
Mon Sep 30 14:18:32 CEST 2013
In Delphi 5,
var
G : TAutoRefreshFlag;
//where type TAutoRefreshFlag = (arNone, arAutoInc, arDefault);
sizeof(G) returns 1
in FPC
if defined
type TAutoRefreshFlag = (arNone, arAutoInc, arDefault);
and same
Var G : TAutoRefreshFlag;
sizeof(G) returns 4.
This different behaviour break some code when I port them from Delphi 5
to FPC.
Is there a compiler directive I can do to ensure compatibility?
Dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130930/2be1191a/attachment.html>
More information about the fpc-pascal
mailing list