You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4033 Reporter: oliver Assigned to:@alainfrisch Status: closed (set by @alainfrisch on 2011-12-21T16:23:47Z) Resolution: duplicate Priority: normal Severity: feature Category: ~DO NOT USE (was: OCaml general) Duplicate of:#5438 Related to:#4076
Bug description
Nice would be to enhance the following warnings:
Y/y enable/disable suspicious unused variables
Z/z enable/disable all other unused variables
so that they also can be used for values that are not
inside any function, but are on the "top-level" of a module/compilation unit.
It's clear that an unconstrained structure (no signature used
by the programmer, so that the default signature is used and
makes all things accessible from the outside) of a compilation
unit or module should not create a warning on internally unused
values (because they might be used from the outside).
But when a signature is used by the programmer to narrow the signature
of a module from the default-sig to a customized sig, then all values
that are not visable from the outside (not part of the signature)
nor used inside the module (not used inside) might be unused ("dead code")
in general and in the future.
And IMHO, throwing out dead code is always a good idea.
Wouldn't the option "-w W"/"-w w" be a candidate here?
The text was updated successfully, but these errors were encountered:
Original bug ID: 4033
Reporter: oliver
Assigned to: @alainfrisch
Status: closed (set by @alainfrisch on 2011-12-21T16:23:47Z)
Resolution: duplicate
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Duplicate of: #5438
Related to: #4076
Bug description
Nice would be to enhance the following warnings:
so that they also can be used for values that are not
inside any function, but are on the "top-level" of a module/compilation unit.
It's clear that an unconstrained structure (no signature used
by the programmer, so that the default signature is used and
makes all things accessible from the outside) of a compilation
unit or module should not create a warning on internally unused
values (because they might be used from the outside).
But when a signature is used by the programmer to narrow the signature
of a module from the default-sig to a customized sig, then all values
that are not visable from the outside (not part of the signature)
nor used inside the module (not used inside) might be unused ("dead code")
in general and in the future.
And IMHO, throwing out dead code is always a good idea.
Wouldn't the option "-w W"/"-w w" be a candidate here?
The text was updated successfully, but these errors were encountered: