gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] no overflow checking ?


From: Breeden, Thomas (tmb)
Subject: Re: [Gm2] no overflow checking ?
Date: Fri, 29 Apr 2011 08:42:52 -0400

Yes, ISO/IEC 10514-1 requires only that a compliant compiler does provide a 
compile mode that produces code that will catch overflows, not that it can't 
provide more relaxed compile modes. From the horse's mouth:

   NOTES

   2 It is expected that implementations will allow users to choose whether or 
     not to detect exceptions by selecting some 'mode
     of use'. To conform to this part of ISO/IEC 10514 an implementation must
     provide a standard mode in which it will detect
     all exceptions whose detection is mandatory.

Tom

> -----Original Message-----
> From: address@hidden [mailto:gm2-
> address@hidden On Behalf Of Fischlin Andreas
> Sent: April 29, 2011 6:03 AM
> To: john o goyo
> Cc: GNU Modula-2
> Subject: Re: [Gm2] no overflow checking ?
> 
> Ok, but AFAIK that does not mean one could not have a compiler option
> which overrules that exception raising. I would implement such a
> standard then by having by default the checking on, but a good
> compiler would allow for full control in the manner I described
> earlier. Besides, the rules for raising an exception for integer
> overflow or floating point overflow or underflow, respectively,
> should be differentiated and not dealt with in one sweep. ;-)
> 
> Regards,
> Andreas
> 
> 
> ETH Zurich
> Prof. Dr. Andreas Fischlin
> Systems Ecology - Institute of Integrative Biology
> CHN E 21.1
> Universitaetstrasse 16
> 8092 Zurich
> SWITZERLAND
> 
> address@hidden
> www.sysecol.ethz.ch
> 
> +41 44 633-6090 phone
> +41 44 633-1136 fax
> +41 79 221-4657 mobile
> 
>              Make it as simple as possible, but distrust it!
> _____________________________________________________________________
> ___
> 
> 
> 
> On 29/Apr/2011, at 03:07 , john o goyo wrote:
> 
> >
> > On 28-Apr-11, at 12:32 PM, Fischlin Andreas wrote:
> >
> >> Dear Arnauld,
> >>
> >> Modula-2's real strength is in checking at compile time as much as
> possible. Catching run time errors are a matter of the
> implementation, i.e. the code the compiler generates and has little
> to do with the language itself.
> >
> > Unfortunately, ISO/IEC 10514-1 requires overflow exceptions to be
> raised if the results of infix whole number, real, or complex
> expressions overflow.
> >
> > john
> 
> 
> _______________________________________________
> gm2 mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/gm2



reply via email to

[Prev in Thread] Current Thread [Next in Thread]