English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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 <daniel.de_rauglaudre@inria.fr> 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 caml-list-request@inria.fr.  Archives: http://caml.inria.fr