mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 02:28:14 +02:00
23 lines
258 B
ObjectPascal
23 lines
258 B
ObjectPascal
program EnumPtrConvTest;
|
|
|
|
{$APPTYPE CONSOLE}
|
|
|
|
{$IFDEF FPC}
|
|
{$MODE DELPHI}
|
|
{$ENDIF}
|
|
{$packenum 1}
|
|
|
|
type
|
|
TEnum = (a, b);
|
|
|
|
var
|
|
e: TEnum;
|
|
p: Pointer;
|
|
|
|
begin
|
|
e := b;
|
|
p := Pointer(e);
|
|
if PtrUInt(p)<>1 then
|
|
halt(1); // produces "1" in Delphi
|
|
end.
|