[fpc-pascal]General Question on code optimization...

Marco van de Voort marcov at stack.nl
Tue Oct 7 16:15:57 CEST 2003


> Hello!
> 
> I wrote a unit for using MySQL a long time ago. It is basically the mysql
> unit, but with some modified/added functions to make life easier. But it is
> still procedural (currently not OOP).
> 
> Now I added some functions which allow me to access SQL data fields by
> their name and some other minor things.
> 
> Since this moment, I cannot compile old programs with this modified unit any
> more on an old SuSE 5.2 system with FPC 1.0.4, while they compile fine with
> the same compiler version on newer Linux versions! (-> Because newer FPC
> versions do not work on SuSE 5.2/5.3, I cannot upgrade to them.)
> 
> I tried to find out the reason, the problem is caused by some string
> definitions which seem to be used only by this new procedures when accessing
> fields by their name. (If somebody wants to have a look on the source, I can
> mail it to him, but I do not want to place here a long source by default.)
> 
> I could understand that the problems arise when I make use of this (new)
> functions, but shouldn't the compiler recognize when I do not use them
> and completely leave them out? In this case, compilation should still work,
> isn't that right?
> 
> If somebody can help, please do so. -- Thanks.

I think the best thing would be to find out what exactly hinders newer
FPC versions, make a few mods and compile a matching version locally.




More information about the fpc-pascal mailing list