Frank Heckenbach wrote:
Well, this one is a little longer than the previous ones, so should I use it?
When I pointed out these special cases in previous mails, I didn't mean to says we should cater for all kinds of practically impossible situations, I rather meant to ask you if you see any real problems (since my numeric experience is rather limited). E.g., when using
So is mine.
the previous version on a machine that really has such strange properties, would it merely produce inaccurate results in some borderline cases (which is probably acceptable on such a strange machine), or produce clearly visible errors (so a user on such a platform would recognize it and report it as a bug, and we'd know about the problem and where it happens), or could it silently produce substantially wrongs results (which would be a real problem)?
That depends. I assume it would just produce more or less inaccurate results, if the machine permits to recover gracefully from overflows, i.e. either it supports infinities, or it returns +/- MaxReal in its stead. Otherwise anything may happen.
(Apart from that, shouldn't it produce warnings rather than errors?)
It did until a recent discussion here when people noted that there should be errors with `--extended-pascal' (or other dialect options which don't contain the given feature), so I changed it. One might want to make it warnings with `-pedantic' and errors with `--extended-pascal', but doing this will be some extra work. If you like to do it, go ahead. ;-) I won't do it for such an unimportant thing (IMHO -- since a program that compiles without problems with `-pedantic' must be in the intersection of ISO 7185, UCSD and Borland Pascal and maybe more, which gives a rather restricted language ;-).
I don't care much about what `-pedantic' does. It just seemed to me that its behavior is inconsistent with its description in the manual :-)
Emil Jerabek