-OoREMOVEEMPTYPROCS
interesting! why is it not available in Lazarus through "all options" window (in project options / customizable options)? (not sure about the names ... I have "opções personalizadas" and "todas as opções"!) Philippe Em 24.09.2014 06:17, Sven Barth escreveu: > Am 24.09.2014 10:15 schrieb "Tomas Hajny" <xhaj...@hajny.biz>: > > However, the trunk compiler offers also another option, although it may or > > may not be usable for you. In particular, take the following: > > > > --------- > > var > > S2: string; > > > > procedure Log (S: string); > > begin > > {$IFDEF TEST} > > WriteLn (S); > > {$ENDIF TEST} > > end; > > > > begin > > ReadLn (S2); > > Log ('Input = ' + S2); > > end. > > ========= > > > > If this is compiled with trunk compiler using -OoREMOVEEMPTYPROCS (without > > -dTEST), procedure Log is not called at all and the concatenation of > > strings in its parameter is skipped as well. > > Another possibility would be to define Log() as "inline", which should get rid of the call and maybe the concatenation as well and already works in 2.6.x (though "array of const" would not be supported if needed) > > Regards, > Sven > > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal [1] Links: ------ [1] 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