Martin Liddle wrote:
In article 200111300132.CAA14769@goedel.fjf.gnu.de, Frank Heckenbach frank@g-n-u.de writes
The code looks correct and compiles and executes properly with the previous version. Is this a known problem as it looks as though it should be fairly easy to produce a test case if required.
So why don't you do this? How can I tell if it's a known problem, or a problem at all, if I don't even know when it happens? Maybe there's a bug in your code that previous GPC versions didn't notice, maybe it's a GPC bug, who knows?
Frank
I seem to have hit a raw nerve and I apologise if my posting was inappropriate. I didn't want to waste the bandwidth of everybody on the list by posting a listing about a known problem. Here is the simplest program I can devise that shows the problem. It compiles and executes with version 20010604 but fails to compile with version 20011123 with the error message "label '1' used before containing binding contour". Please note that there is a trivial work around for the real code so this is a very low priority problem for us.
Program TCS_Test1; Label 1;
Var Line:String(255); Fseed:Text;
Begin Line:='ABC'; If Line[1] <>'C' then Goto 1; Reset(FSeed,Line+'seed'); 1: End.
Providing the test program (martin1.pas) was important. The really guilty one is the string addition. That's a known problem and has surfaced in other forms recently. I'm a bit surprised how often it appears recently, since AFAIK not much has changed in this area for quite some time. But bugs have lives of their own ...
Probably only Peter can fix this bug. You might want to get in direct contact with him (e.g., via info@g-n-u.de) if you need to know when he has the time to fix it.
Work-arounds for this case would be to encapsulate the problematic statement (Reset) in an additional `begin'/`end' block, or move it to a subroutine.
Frank