Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
False positives 'unused type/constructor/value' using 4.06.0+beta1 #7656
Original bug ID: 7656
The attached menhir test-case produces false-positive warnings when all warnings are activated.
Steps to reproduce
By compiling the attached menhir file using ocamlbuild:
ocamlbuild -use-menhir -tag "warn(A-4)" parser.cmo
We get the following warnings:
File "parser.ml", line 2, characters 0-30:
This does not appear with OCaml 4.05.0. Every unused type/constructor/value are used when looking at the code generated by menhir.
Also, I cannot find any of the values listed above, in the generated code (neither menhir_begin_marker, xv_main nor menhir_end_marker).
Comment author: jpdeplaix
Ok, with some more tests I realized it was specifically the --infer argument from menhir that causes the issue.
type t = Test
$ ocamlc -w A-4 -i test.ml