Browse thread
Calling C from OCaml, GC problems
-
David.Mentre@i...
-
Xavier Leroy
- David.Mentre@i...
- Juan J. Quintela
-
Xavier Leroy
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David.Mentre@i... |
| Subject: | Re: Calling C from OCaml, GC problems |
Xavier Leroy <Xavier.Leroy@inria.fr> writes: > > 2. when compiling, I've tons of warning like this: > > bdd_interface.c: In function `mlbdd_alloc_manager': > > bdd_interface.c:136: warning: left-hand operand of comma expression has no effect > > bdd_interface.c:136: warning: unused variable `caml__dummy_result' > > I think those warnings are harmless, and are due to the way the > CAMLxxx macros are written in 2.04. But only Damien Doligez knows for > sure... Yes. Having a deeper look at those macros, I've found that the first warning as been fixed in ocaml 2.99 (the macros CAMLxparam referenced a the caml__frame variable without using it). However, the second warning is still there (even if harmless). The problem is that the caml__dummy_##name variables are no longer used. Such variable is only used to make some side-effects using C '(stmt1, stmt2, ..., stmtN)' notation. I see no way to fix this. C lack the Caml 'let _ ='. :) Any way, many thanks for the feedback. Best regards, d. -- David.Mentre@irisa.fr -- http://www.irisa.fr/prive/dmentre/ Opinions expressed here are only mine.