Martin Liddle wrote:
I believe that I have mentioned this problem previously but have not been confident that it was a bug. I am now. I have repeatedly been hit by the problem that initialising a set to the empty set will work correctly for many versions of a program then recompiling the source without changing anything will produce a version where the set is not initialised (I think but am not certain that it is left with whatever value it had previously). A typical code snippet might be
Const Maxcomp=180; Type TSetComp=Set of 1..Maxcomp; Var SetComp:TSetComp;
begin SetComp:=[]; ...
Usually this will result in SetComp being the empty set. Our code uses sets quite extensively and every so often we will build a version of the code where one or other of the sets is not initialised. The behaviour is then repeatable until we build a new version. This makes testing a complete nightmare as we have to test everything each time we build a new version even if nothing has changed. The workaround that I have not seen fail, is to use
SetComp:=[1]-[1];
This is with gpc version 19991030 based on 2.95.2 running under RedHat Linux 6.2 on a Pentium PC. To me this smells like an uninitialised variable in the compiler that only gives problems when it picks up a limited range of values. Apologies if this is a known problem (and more apologies if it is fixed in a later snapshot) but I couldn't immediately see it in the bug lists.
I don't remember having seen this particular problem, and it's probably not in the bug list. ISTR since a year ago, some things have changed in the set handling, but I don't know many details. So upgrading to the current version might help, or it might not... (Please let me know if it does if you try it.)
Could somebody recommend a strategy for using the daily snapshots? Is it a case of taking pot luck or are their particular releases that are known to work tolerably well?
There haven't been substantial changes in the last few weeks, so using a recent version should probably work...
Is their likely to be a beta in the near future?
According to most people's definition of "near", probably no, I'm afraid...
Frank