Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning message for unused exception uses "extension", which is confusing. #7139

vicuna opened this issue Feb 8, 2016 · 2 comments


None yet
2 participants
Copy link

commented Feb 8, 2016

Original bug ID: 7139
Reporter: @gasche
Assigned to: @mshinwell
Status: resolved (set by @mshinwell on 2016-12-12T15:19:50Z)
Resolution: fixed
Priority: normal
Severity: text
Target version: 4.03.1+dev
Fixed in version: 4.04.0
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @diml @hcarty

Bug description

Having the unused exception
exception Bad_magic_version of version

gives the following error message
File "utils/", line 660, characters 2-40:
Warning 38: unused extension constructor Bad_magic_version.

I think that this is confusing for people that don't know about "extension constructor", and do not need to know about it. The error message should say

Warning 38: unused exception Bad_magic_version.

Steps to reproduce

$ cat
module M : sig end = struct
exception Foo of int

$ ocamlc -w +38 -c
File "", line 2, characters 2-22:
Warning 38: unused extension constructor Foo.


This comment has been minimized.

Copy link

commented Apr 18, 2016

Comment author: @gasche

I'm pushing back to 4.04; this usability issue is already present in 4.02.3, so it can wait for 4.04.

I proposed a patch at



This comment has been minimized.

Copy link

commented Dec 12, 2016

Comment author: @mshinwell

#552 has now been merged.

@vicuna vicuna closed this Dec 12, 2016

@vicuna vicuna added this to the 4.03.1 milestone Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.