Re: C FAQ 3.1
- From: Lawrence Kirby <lknews@xxxxxxxxxxxxxxx>
- Date: Tue, 26 Apr 2005 13:56:34 +0100
On Tue, 26 Apr 2005 12:04:15 +0000, Stan Milam wrote:
> Peter Nilsson wrote:
>> ccwork wrote:
>>
>>>Hi all,
>>
>>>Why can't it be unspecified?
>>
>>
>> The real question is: Why _should_ it be specified?
>>
>
> Because it would clear up a lot of confusion, specify exactly what the
> behavior should be. I am convinced we have undefined behavior because
> K&R were too lazy or in a hurry to specify exactly what should happen in
> these now undefined cases.
It is more likely because this freedom gives compilers extra scope for
optimisation. On some architectured the natural calling sequence might
favour left to right evaluation of arguments, on another ot might be right
to left. Some optimisers might find advantages in other arrangements. It
isn't that common for the order of evaluation to cause a problem so making
it unspecified is a reasonable choice.
Lawrence
.
- Follow-Ups:
- Re: C FAQ 3.1
- From: Michael Wojcik
- Re: C FAQ 3.1
- From: Richard Bos
- Re: C FAQ 3.1
- References:
- C FAQ 3.1
- From: ccwork
- Re: C FAQ 3.1
- From: Peter Nilsson
- Re: C FAQ 3.1
- From: Stan Milam
- C FAQ 3.1
- Prev by Date: Re: assigning void * type value
- Next by Date: Re: C FAQ 3.1
- Previous by thread: Re: C FAQ 3.1
- Next by thread: Re: C FAQ 3.1
- Index(es):
Relevant Pages
|
Loading