Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Win32 API
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-06-04 (10:29)
From: Stefan Monnier <monnier+lists.caml/news/@r...>
Subject: Re: [Caml-list] Win32 API
>>>>> "Daniel" == Daniel de Rauglaudre <> writes:
> On Sun, Jun 03, 2001 at 09:01:49PM -0700, Harry Chomsky wrote:
>> Now, what happens in the following situation?
>> some_function(alloc_something(), alloc_something_else());
> It is unsafe. In C, you cannot call a function of two parameters if one
> can modify the evaluation of the other.

It is unsafe in the case of O'Caml because of the GC, but as far as C
is concerned, this is not unsafe but only undefined since the
evaluation order is undefined.  And since in this case you don't care
which value you get, the undefinedness would be irrelevant.

To unsubscribe, mail  Archives: