On 23/02/2025 14:16, Jonas Maebe via fpc-devel wrote:
On 23/02/2025 14:14, Martin Frb via fpc-devel wrote:
Is it correct (i.e. by design) that the compiler emits some "may not be initialized" warnings, only on certain optimization levels?

Yes. Those warnings depends on data flow analysis, which is only enabled by defaullt at -O3 and higher. You can also enabled it separately with -Oodfa.

Ok, so without dfa it does not omit the warning, probably because it has see that there was a conditional initialization? (i.e. might be ok, at least sometimes, even if certainly not always)

Meaning -O1 is lenient in its checks, because they are not as evolved.


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to