[fpc-devel] Pointer type declaration issue

Sven Barth pascaldragon at googlemail.com
Wed Nov 10 21:39:24 CET 2010


On 10.11.2010 21:20, Thaddy wrote:
> Small example, 2.5.1 trunk from today
>
> ---
> program Project2;
>
> {$APPTYPE CONSOLE}
> uses windows;
>
> {$DEFINE SHOULD_COMPILE_IN_FPC } // add dot after "{"
> {$IFDEF SHOULD_COMPILE_IN_FPC}
> type
> PPValueA = ^TPValueA;
> PPValue = PPValueA;
>
> pvalueA = packed record
> pv_valuename: PAnsiChar; { The value name pointer }
> pv_valuelen: BOOL;
> pv_value_context: Pointer;
> pv_type: DWORD;
> end;
>
> pvalue = pvalueA;
> TPValueA = pvalueA;
> TPValue = TPValueA;
> {$ELSE WILL_COMPILE_IN_FPC}
> type
>
> pvalueA = packed record
> pv_valuename: PAnsiChar;
> pv_valuelen: BOOL;
> pv_value_context: Pointer;
> pv_type: DWORD;
> end;
>
> TPValueA = pvalueA;
> TPValue = TPValueA;
>
> PPValueA = ^TPValueA;
> PPValue = PPValueA;
>
> pvalue = pvalueA;
>
> {$ENDIF}
> begin
> //
> end.

I don't know what you're doing wrong, but it compiles here O.o

FPC 2.4.0rc1 and FPC 2.5.1 (built on 07th November 2010).
Platform: i386-linux (tested with i386-win32 as well).

I'll update to today's trunk version.

Regards,
Sven



More information about the fpc-devel mailing list