[Omake] Build fails with ocaml compile warnings

Hugo Ferreira hmf at inescporto.pt
Fri Mar 23 01:44:36 PDT 2007


Hello Aleksey,

Aleksey Nogin wrote:
> Hugo,
> 
> This is more of an OCaml issue, than an OMake one. 

Actually it is a camlp4 issue. In my case the expansion
of an expression generates something like [do {a; b; c} ].
This is a bug (corrected in version 3.10 it seems) but in
any event I can never really control the preprocessor's
output so I am stuck with such warnings.

 > If you want to ignore the errors (although I would
 > suggest trying to fix them first, especially the
 > "S" ones), you need to relax the "-warn-error A" you are
> using in your ocamlc call.
> 

I really wanted to avoid this and see all warnings because
the code that uses these extensions also has (my) hand-crafted
code which should be fully checked by the compiler.

I can see that avoiding warnings is not trivial. You would have
to parse the compiler's output I guess. To do this for all tools'
output may not be feasible.

Anyway, I will first attempt to circumvent camlp4 bug and
then see how I can handle this. If you have any other
suggestions though please tell me.

Thank you,
Hugo F.


> Aleksey
> 
> On 22.03.2007 11:32, Hugo Ferreira wrote:
> 
>> Hello,
>>
>> I am preparing a camlp4 build and have a small test file. Ocaml 
>> compilation of this file results in 4 warnings (see end of message). I 
>> have tried using the "-k" flag but to no effect. My question is: is 
>> this the expected behavior or is their another way to finish the build 
>> when warnings occur.
>>
>> TIA,
>> Hugo F.
>>
>>
>>  ocamlfind ocamlc -package "oUnit,res" -warn-error A -g -g -pp 
>> "camlp4o -I . pa_logic.cmo" -I . -I ../res_stck -I ../qalist -I 
>> ../term -I ../symbl_tbl -I ../compile -I ../parser-lexer -c test.ml
>> File "test.ml", line 52, characters 12-14:
>> Warning Y: unused variable t1.
>> File "test.ml", line 52, characters 20-23:
>> Warning S: this expression should have type unit.
>> File "test.ml", line 52, characters 26-34:
>> Warning S: this expression should have type unit.
>> File "test.ml", line 52, characters 36-44:
>> Warning S: this expression should have type unit.
>>
>> _______________________________________________
>> Omake mailing list
>> Omake at metaprl.org
>> https://lists.metaprl.org/mailman/listinfo/omake
>>
> 
> _______________________________________________
> Omake mailing list
> Omake at metaprl.org
> https://lists.metaprl.org/mailman/listinfo/omake
> 



More information about the Omake mailing list