Compiling Lazarus/Windows in typed pointers mode
Currently Lazarus does not immediately provide for project-wide safe pointers: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40262 Luckily, FPC provides for `-Sy` command line switch. However, after specifying it in Project Options / Compiler Options/ Additions and Overrides it becomes impossible to compile alsmot any Windows GUI program. Attached is the patch that fixes this type check errors. By a cursory glance, the code logic there was correct and just explicitly declaring to cancel type safety was doing the trick (or dumping C notion "array si pointer" and taking array element pointer explicitly). [0001-T-AKA-Sy-compilation.patch](/uploads/18b27a4483a199e49a6598f6dce30a5b/0001-T-AKA-Sy-compilation.patch)
issue