Re: PPC/Intel difference for out-of-range double -> int conversion
Re: PPC/Intel difference for out-of-range double -> int conversion
- Subject: Re: PPC/Intel difference for out-of-range double -> int conversion
- From: "Mark Wagner" <email@hidden>
- Date: Thu, 22 May 2008 13:25:24 -0700
On 5/22/08, Sherm Pendley <email@hidden> wrote:
> On Thu, May 22, 2008 at 3:16 PM, Robert Purves <email@hidden> wrote:
>
> >
> > [Q1] Do these startling differences occur because the results are
> 'undefined' in the C standard, or because they are
> 'implementation-dependent'?
>
> Both. :-)
>
> What the C standard refers to as "undefined behavior" is by definition
> implementation-dependent.
There's a big difference between "implementation-dependent" behavior
and "undefined" behavior.
If something is implementation-dependent, then the implementation must
define a behavior and document it. A program using the
implementation-defined feature can count on it to behave the defined
way every time.
If something is undefined, then absolutely anything is permissible. A
program using an undefined feature can run as the user expects one
time, and drain your bank account and buy tickets to Bermuda the next.
--
Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden