Sign in Join
Wiki copytemporary

FPC New Features 3.2.0

About this page

FPC 3.2.0 has been released on June 19th, 2020.

Below you can find a list of new features introduced since the previous release, along with some background information and examples.

A list of changes that may break existing code can be found at User Changes 3.2.

All systems

Compiler options

Default unit scopes

Language

Support for interfacing with C blocks functionality

Support for Default Namespaces

Dynamic Arrays supported by Insert()

Dynamic Arrays supported by Delete()

Dynamic Arrays supported by Concat()

Dynamic Arrays have built in + operator support

Dynamic Array constants and variable initialization

Dynamic Arrays constructors

More settings supported by $Push/$Pop

Support for threadvar sections inside class and record types

Support for Generic Routines

pascal
unit UTestObjFPCSyntax;

{$mode ObjFPC}

interface

generic function Add<T>(const Arg1, Arg2: T): T;

implementation

generic function Add<T>(const Arg1, Arg2: T): T;
begin
  Result := Arg1 + Arg2;
end;

end.
pascal
program TestObjFPCSyntax;

{$mode ObjFPC}{$H+}

uses
  UTestObjFPCSyntax;

begin
  Writeln(specialize Add<String>('Hello', 'World'));
  Writeln(specialize Add<LongInt>(23, 19));
end.
pascal
unit UTestDelphiSyntax;

{$mode Delphi}

interface

function Add<T>(const Arg1, Arg2: T): T;

implementation

function Add<T>(const Arg1, Arg2: T): T;
begin
  Result := Arg1 + Arg2;
end;

end.
pascal
program TestDelphiSyntax;

{$mode Delphi}

uses
  UTestDelphiSyntax;

begin
  Writeln(Add<String>('Hello', 'World'));
  Writeln(Add<LongInt>(23, 19));
end.

Management operators for record types

Method RTTI for interfaces

Support for helper types extending interface types

Support for "IsManagedType" intrinsic

Support for PE/COFF metadata directives

Support for WinAPI directive

Support for a distinct Boolean8 type

Units

rtl-generics units

Rtti unit

ProcessUnicode unit

Registry unit

CHM package

Text-mode IDE

GDB/MI support

macOS/iOS

New iosxwstr unit

Cocoaint units updated

i8086-msdos

Huge memory model

Internal assembler (object writer)

Internal linker

FarAddr internal function

Near and far procedure variables

type
  TFarProc = procedure(a, b: Integer); far;
  TNearProc = procedure(a, b: Integer); near;

Near procedure variables are 2 bytes long, so they contain only an offset. They are invoked with a near call instruction. Far procedure variables are 4 bytes long (16-bit offset + 16-bit offset) and are invoked with a far call. Note that you cannot simply convert a near procedure to a far procedure, by just filling in the segment part, because the call model is also different between near and far procedures. A far call instruction pushes a 4-byte far (segment:offset) return address and the function must terminate with a far return instruction - retf. A near call instruction pushes only a 2-byte offset on the stack and the function must terminate with a near return instruction - retn.

i386-go32v2

A new archive was added that contains alternative builds of the textmode IDE.

i386-win32

The i386-win32 target now defaults to using SEH compatible exceptions

x86_64-win64

Support for Microsoft's vectorcall calling convention

New compiler targets

Support for the AArch64 target

Support for the Linux/ppc64le target

Support for the Android/x86_64 target

Support for the i8086-win16 (16-bit Windows) target

New Features from other versions


From the Free Pascal wiki, page "FPC New Features 3.2.0", as it stood on 2022-02-07 after a change by Marcov, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.