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

Annotation [@warning "-32"] does not work correctly #7624

Closed
vicuna opened this issue Sep 12, 2017 · 2 comments
Closed

Annotation [@warning "-32"] does not work correctly #7624

vicuna opened this issue Sep 12, 2017 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Sep 12, 2017

Original bug ID: 7624
Reporter: dinosaure
Assigned to: @alainfrisch
Status: resolved (set by @alainfrisch on 2017-09-13T21:51:21Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.03.0
Fixed in version: 4.06.0 +dev/beta1/beta2/rc1
Category: language features

Bug description

When we have a unused value annotated with [@warning "-32"] and we compile with '-w @32', the compiler remains in fail.

Steps to reproduce

main.ml:
let[@warning "-32"] f x = x

let g x = x

let () = print_endline "Hello Word!"

main.mli:
val g : 'a -> 'a

$ ocamlc -w @32 main.mli main.ml

Additional information

When we put [@@@warning "-32"] at top-level, all works - but I don't want to silent warning about all unused values.

@vicuna
Copy link
Author

vicuna commented Sep 12, 2017

Comment author: dinosaure

Tested with 4.06.0+pr1248 too.

@vicuna
Copy link
Author

vicuna commented Sep 12, 2017

Comment author: @xclerc

Pull request: #1327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants