IMO compilers should be dogmatic otherwise one cannot rely on them. This looks
to me like advocating wrong optimization.
Blaazen
______________________________________________________________
Od: silvioprog <silviop...@gmail.com>
Komu: "FPC-Pascal users discussions" <fpc-pascal@lists.freepascal.org>
Datum: 31.03.2016 15:33
Předmět: [fpc-pascal] Class constructor called unconditionally
As long as you don't use the class anywhere outside the class itself, the compiler takes this as the class not used at all and hence won't call the class constructor. So I guess you have to use the intialization section instead of tweaking the code to fool the compiler. Take the pragmatic approach instead of the dogmatic one. It will be more readable anyway.--
Silvio Clécio
----------
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
<http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal>
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal