Original bug ID: 7081 Reporter:@sliquister Assigned to:@diml Status: closed (set by @xavierleroy on 2017-02-16T14:18:16Z) Resolution: fixed Priority: normal Severity: minor Version: 4.02.3 Fixed in version: 4.03.0+dev / +beta1 Category: ~DO NOT USE (was: OCaml general)
The toplevel ignores [@ocaml.ppwarning ".."], which is quite confusing.
using an AST mapper here is not perfect as you can't disable the warning with [@@@ocaml.warning "-22"].
Indeed, and here is what the comment in the code says:
let emit_external_warnings =
(* Note: this is run as a preliminary pass when type-checking an
interface or implementation. This allows to cover all kinds of
attributes, but the drawback is that it doesn't take local
configuration of warnings (with '@@warning'/'@@warnerror'
attributes) into account. We should rather check for
'ppwarning' attributes during the actual type-checking, making
sure to cover all contexts (easier and more ugly alternative:
duplicate here the logic which control warnings locally). *)