Non-exhaustive pattern matching leads to compilation error
ID0000224: This issue was created automatically from Mantis Issue 224. Further discussion may take place here.
Id | Project | Category | View | Due Date | Updated |
---|---|---|---|---|---|
ID0000224 | Frama-C | Kernel | public | 2009-09-01 | 2009-09-23 |
Reporter | mehdi | Assigned To | signoles | Resolution | fixed |
Priority | normal | Severity | major | Reproducibility | always |
Platform | - | OS | - | OS Version | - |
Product Version | Frama-C Beryllium-20090601-beta1 | Target Version | - | Fixed in Version | Frama-C Beryllium-20090902 |
Description :
Hi,
When compiling frama-c in bytecode on a non-native architecture (even if OCaml 3.11.1 is available), compilation fails due to a non-exhaustive pattern matching.
The relevant lines are:
Ocamlc src/lib/dynlink_common_interface.cmi Generating src/lib/dynlink_common_interface.ml Ocamlc src/lib/dynlink_common_interface.cmo File "src/lib/dynlink_common_interface.ml", line 77, characters 25-491: Warning P: this pattern-matching is not exhaustive. Here is an example of a value that is not matched: Inconsistent_implementation _ File "src/lib/dynlink_common_interface.ml", line 1, characters 0-1: Error: Error-enabled warnings (1 occurrences)
Please find attached a (trivial) patch that fixes this bug.
OCaml 3.11.1 is available on those architectures (e.g., hppa, mips, s390) with only the bytecode backend. So why do not activate the dynlink option or those too? In the configure script, you seem to rely on the presence of dynlink.cmxa. But dynlink.cma is also present when compiling in bytecode. I hope this will be fixed too.
Best regards,
-- Mehdi