Original bug ID: 7407 Reporter: shayne_fletcher Status: resolved (set by @xavierleroy on 2017-02-23T15:46:22Z) Resolution: fixed Priority: normal Severity: minor Version: 4.04.0 Fixed in version: 4.05.0 +dev/beta1/beta2/beta3/rc1 Category: ~DO NOT USE (was: OCaml general)
As far as I understand from looking at the README and the ./configure script, building OCaml on Solaris is usually done (and tested) using gcc. Do you have a particular reason to use the system compiler instead?
In any case it would be interesting to resolve any reasonable issue found by a more stringent compiler.
In the case of objinfo_helper.c, I don't see why we actually need caml/alloc.h -- and it builds fine if I remove the include. Could someone that knows better comment on whether removing the #include would be safe?
I agree "a ? b : c" should never be used when "b" and "c" have incompatible types: even though GCC and probably Clang tolerate the case where one of "b" and "c" has type "void" and the other doesn't, this is not conformant ISO C code and will get rejected (rightly so) by other compilers.
I'd suggest to special-case CAML_SYS_EXIT and just add a cast to (void) in the "else" branch.
Do you have a particular reason to use the system compiler instead?
Organizational policy I'm afraid; regardless of my feelings on the matter this kind of constraint usually can't be worked around here. That said, in this particular instance I might be able to get away with switching to gcc and we're trying that now.