If some variables turn out to have types different from
what I declare them to be, which optimization settings
(DECLARE (OPTIMIZE ...)) still guarantee safe outcome
(no seg faults or silent type errors) ?
·······@ziplip.com wrote:
> If some variables turn out to have types different from
> what I declare them to be, which optimization settings
> (DECLARE (OPTIMIZE ...)) still guarantee safe outcome
> (no seg faults or silent type errors) ?
See section 3.2.2.3. There are no optimization settings that
have the effect you desire in a standard way.
Paul
"Paul F. Dietz" <·····@dls.net> writes:
> ·······@ziplip.com wrote:
> > If some variables turn out to have types different from
> > what I declare them to be, which optimization settings
> > (DECLARE (OPTIMIZE ...)) still guarantee safe outcome
> > (no seg faults or silent type errors) ?
>
> See section 3.2.2.3. There are no optimization settings that
> have the effect you desire in a standard way.
How about making safety optimization quality not less than 1? I did
not find anything relevant to this in HyperSpec in a minute, thought.
--
Janis Dzerins
Common Lisp -- you get more than what you see.
Janis Dzerins wrote:
> How about making safety optimization quality not less than 1? I did
> not find anything relevant to this in HyperSpec in a minute, thought.
There's nothing I can find in the standard that would require a
conforming implementation to honor this.
Paul
In article <···············@gulbis.latnet.lv>,
Janis Dzerins <·····@latnet.lv> wrote:
>"Paul F. Dietz" <·····@dls.net> writes:
>
>> ·······@ziplip.com wrote:
>> > If some variables turn out to have types different from
>> > what I declare them to be, which optimization settings
>> > (DECLARE (OPTIMIZE ...)) still guarantee safe outcome
>> > (no seg faults or silent type errors) ?
>>
>> See section 3.2.2.3. There are no optimization settings that
>> have the effect you desire in a standard way.
>
>How about making safety optimization quality not less than 1? I did
>not find anything relevant to this in HyperSpec in a minute, thought.
A high safety setting forces many of the standard functions to perform
argument type checking, but it doesn't force user-defined functions to do
so.
--
Barry Margolin, ··············@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
········@ziplip.com" <·······@ziplip.com> writes:
> If some variables turn out to have types different from
> what I declare them to be, which optimization settings
> (DECLARE (OPTIMIZE ...)) still guarantee safe outcome
> (no seg faults or silent type errors) ?
None.
If you declare a type, you are making a promise to the compiler
and it is allowed to believe you.