Compiler modes and strictness

PXX has one dialect, not several semantic modes. What changes is how strict that dialect is about a handful of FPC-parity rules. This page explains the model as a whole; the individual switches are listed on the command line page and, for the in-source forms, on the directives page.

The model: lax → strict → mimic

Why lax is the default

PXX is its own dialect first and an FPC-compatibility tool second. The lax default serves the dialect; the strict flags and --mimic-fpc serve compatibility when you want it. That split is deliberate: you opt into FPC-parity strictness per rule, rather than opting out of it.

Note that {$mode objfpc} / -Mobjfpc and the other FPC mode markers are accepted as compatibility markers only — they do not switch PXX into a different semantic mode. Strictness is controlled by the switches above, not by the mode marker.

Next