From: ·······@ziplip.com
Subject: declaring types
Date: 
Message-ID: <F2CED3OLJUJZBZGGB2ELN4FSAPCDH2IJPQBQLSCJ@ziplip.com>
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) ?

From: Paul F. Dietz
Subject: Re: declaring types
Date: 
Message-ID: <3F3EF626.2070600@dls.net>
·······@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
From: Janis Dzerins
Subject: Re: declaring types
Date: 
Message-ID: <twk8yprqx94.fsf@gulbis.latnet.lv>
"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.
From: Paul F. Dietz
Subject: Re: declaring types
Date: 
Message-ID: <L_GdnatjA6a4VN2iXTWJjw@dls.net>
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
From: Barry Margolin
Subject: Re: declaring types
Date: 
Message-ID: <rc50b.169$mD.75@news.level3.com>
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.
From: Joe Marshall
Subject: Re: declaring types
Date: 
Message-ID: <ada6yf39.fsf@ccs.neu.edu>
········@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.