[fpc-pascal] mode switch madness
Michael Van Canneyt
michael at freepascal.org
Fri Apr 12 16:15:55 CEST 2019
On Fri, 12 Apr 2019, Ryan Joseph wrote:
> Can I propose we add a new $modeswitch-all (or some equivalent) that globally sets modeswitch in all subsequent units? I’m thinking about how messy this list is getting after these new mode switches are added and that the problem is only going to grow. I really like how FPC lets us opt into specific features but it’s becoming unruly and tedious.
>
> Even if this isn’t the best solution anything resembling a manager or wrangler would be good.
>
> program test;
>
> {$modeswitch-all autoderef}
> {$modeswitch-all advancedrecords}
> {$modeswitch-all typehelpers}
> {$modeswitch-all multihelpers}
> {$modeswitch-all implicitfunctionspecialization}
That would break with the rule that directives do not cross unit boundaries.
It has far-reaching consequences.
Better introduce a command-line switch to set mode switches.
Michael.
More information about the fpc-pascal
mailing list