[fpc-pascal] Re: [fpc-devel] Submitted bug report on option order -Sa -Sg-

Tom Verhoeff T.Verhoeff at tue.nl
Sun Apr 15 21:14:50 CEST 2007

(Discussion switched from fpc-devel to fpc-pascal, because it might be
of more general interest.)

On Sat, Apr 14, 2007 at 06:56:12PM +0200, Jonas Maebe wrote:
> On 13 Apr 2007, at 17:38, Tom Verhoeff wrote:
> >The order -Sa -Sg- fails to generate assertion checking code, whereas
> >this is generated for the order -Sg- -Sa.
> >
> >A separate test confirms this (mis)behavior (see bug report: Steps To
> >Reproduce).
> >
> >Or am I missing the obvious, and is this really a feature and not a  
> >bug?
> -S- disables all the -S options, regardless of where the second -  
> appears (like -O- disables all -O options). This can indeed be  
> confusing, since e.g. -Cor- turns on overflow checking, but disables  
> range checking. This is indeed not consistent. Both cases work as  
> designed, but the design is obviously not optimal.

Thanks for the explanation.  I think I understand what you are saying.

In the (on-line) User's Guide, I can't find anything about the use of
a trailing - for options.  Where is this documented?

How would one disable just the goto statement, without affecting other
-S options?

By the way, the User's Guide states that goto statements are disabled
by default.  However, the reason we added the -Sg- (attempting to disable
just goto statements) was because after upgrading, suddenly programs
with goto were accepted (and we don't want that in our educational use
of Pascal).  Hence, we added the option.

Could it be that the default configuration file also got changed by the
update and now enables goto statements?  (This would be confusing.)

E-MAIL: T.Verhoeff @ TUE.NL     | Dept. of Math. & Comp. Science
PHONE:  +31 40 247 41 25        | Technische Universiteit Eindhoven
FAX:    +31 40 247 54 04        | PO Box 513, NL-5600 MB Eindhoven
http://www.win.tue.nl/~wstomv/  | The Netherlands

More information about the fpc-pascal mailing list