On 02/03/2015 11:33 AM, misu kun wrote:
i mean even if you initilize c with a const value.
i enabled {$optimization constprop} but nothing changed !


(E.g.) another thread could modify on the fly c without the "function test" knowing. Hence it needs to reload c with every usage. In C this is managed by the "volatile" keyword, AFAIK, in Pascal all static variables need to be considered "volatile".

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

Reply via email to