camlp4: quotation issue with strings #5442
Original bug ID: 5442
This was reported on 2011-07-11 by Petter Urkedal on caml-list under the subject "Quotation issue with camlp4 printer".
The attached program prints out
when compiled with ocamlc and camlp4 version 3.12.0. As you can see,
Steps to reproduce
ocamlc.opt -c -I +camlp4 -pp camlp4orf -o quotation_bug.cmo
A tentative fix was done in commit 11119, but it breaks findlib (among others) because it double-escapes everything in string constants when preprocessing normal code with "camlp4 pa_o.cmo pr_o.cmo".
It looks like the problem is in the parsing of quotations, not in the printing code.
Comment author: @damiendoligez
There is a problem with the fix: it breaks type-conv 2.3.0.