On Thu, 31 Mar 2016, silvioprog wrote:

On Thu, Mar 31, 2016 at 10:58 AM, Vojtěch Čihák <vojtech.ci...@atlas.cz>
wrote:

IMO compilers should be dogmatic otherwise one cannot rely on them. This
looks to me like advocating wrong optimization.



Blaazen


Thanks for reply Vojtěch, but are you referring to Delphi or FPC
optimization?

In general. You should never rely on such behaviour. This is not very robust programming.


I think that FPC should keep the Delphi class constructor behaviour in MODE
DELPHI, allowing the programmers to port Delphi libraries to FPC, but ...

I suspect the problem is not in the mode, but in detecting whether a class is 
used
or not in a program. It becomes very complicated when you use e.g. run-time 
packages.

Delphi itself is buggy in this regard, and has been since at least D7.
For this reason, in general I advise against extensive use of initialization 
sections etc...

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to