Mantis - Bisect
Erweiterte Problemanzeige
36 general kleinerer Fehler N/A 2009-03-13 13:52 2009-03-21 15:35
Etienne Millon  
keine 1.0beta  
0000036: Cannot instrument under -unsafe
ocamlc (version 3.10.2) emits the following warning when compiling with the -unsafe option active
"Warning: option -unsafe used with a preprocessor returning a syntax tree"

Besides this warning, it seems to work properly.

If it is not possible to turn on -unsafe, it should be in the documentation (anyway, the instrumented version should show less performance than the verbatim one, so -unsafe is useless in this case)
2009-03-13 13:52 Etienne Millon Neues Problem
2009-03-21 15:35 xclerc Problemnotiz hinzugefügt: 0000171
2009-03-21 15:35 xclerc Status neu => erledigt
2009-03-21 15:35 xclerc Behoben in Version => 1.0beta
2009-03-21 15:35 xclerc Lösung offen => erledigt
2009-03-21 15:35 xclerc Bearbeitung durch => xclerc

2009-03-21 15:35   
As camlp4 is constructing a syntax tree, passing the "-unsafe" switch to
ocamlc is "too late": the syntax tree contains the code for "safe" compilation.
Thus, the '-unsafe' switch should be passed to camlp4 instead.

This means that compiling an "unsafe" module is done by:
   ocamlc -c -I +bisect -pp 'camlp4 -unsafe /path/to/instrument.cma'
instead of:
   ocamlc -unsafe -c -I +bisect -pp 'camlp4 /path/to/instrument.cma'

[The manual with be modified to explain this point]