da Silva, Joe wrote:
Thanks for addressing the label scope problem, and for the tips about DJGPP, Frank.
I should perhaps have been more clear however, that the inconsistent behaviour I observed with the DJGPP port of the compiler, when errors or warnings were reported, is a separate problem, I think. In other words, this is not specific to the label scope problem, although I used this as an example of this behaviour.
So, have others using the DJGPP port observed similar behaviour when errors or warnings are reported? Does this also occur with other ports of GPC (20010924-2.95.3)? To recap, "whenever an error or warning is issued, the compiler misbehaves, often crashing. This behaviour is inconsistent, so that consecutive runs of the compiler with the same source code and environment produce different results. When no error or warning is reported, everything seems fine and the results are consistent".
Such behaviour might be due to uninitialized variables etc. in the compiler. I've observed similar things under Linux (though more reproducible). If you can, you might want to locate the crash position in the compiler. -- On Linux, I get the core file (must not be disabled, of course) and use gdb to find the source position within gpc1 (must not be stripped). I don't know the details on DJGPP, but I see something in the DJGPP FAQ (chapter 12.2 in version 2.30) about `symify' which might do the job.
The two functions I've found almost all crashes in in the last time are get_type_name() and get_operator_identifier(). So if you find it crashing there, I wouldn't be too surprised. I've added a number of safety checks there recently, so reporting any crash there before the next release is probably not worth it. But after the release, please do so if you can -- and report any other crash positions.
Frank