← board

Policy: FPC-bootstrap subset vs PXX-only library features

The distinction (make it explicit)

There are two compilation worlds, with different allowed feature sets:

  1. compiler/* (the compiler itself) is compiled by both FPC (the bootstrap seed) and PXX (self-host, byte-identical fixedpoint). It may only use the intersection of FPC and PXX — the restricted self-host subset. No classes, no sets-heavy code, no PXX-only sugar, careful {$ifdef FPC} use (compiler.pas:213). This is a hard constraint: anything FPC rejects, or where FPC and PXX diverge, cannot live here. (See [[project_fpc_define_landmine]].)

  2. lib/* (RTL, LCL, and units like classes/streams/collections/typeinfo) is compiled only by PXX. It may use the full PXX feature set — classes, sets, N-D arrays, the new const/array forms, the upcoming variadic-array of const sugar and library writeln, the proposed object type, etc. FPC compatibility is irrelevant here.

This boundary is already real in practice (the lib/ units use classes the compiler can't), but it is not written down anywhere as policy. Writing it down prevents two failure modes: (a) someone adds a PXX-only feature to compiler.pas and breaks the FPC bootstrap; (b) someone avoids a perfectly good PXX feature in a library because they think "the compiler can't use it."

The rule

Why it matters / what to exploit

Acceptance

Notes