[m-rev.] for review: --warn-dead-procs-with-live-siblings
novalazy at gmail.com
Thu Dec 10 15:14:39 AEDT 2015
On Tue, 08 Dec 2015 16:41:34 +1100 (AEDT), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> For review by anyone.
> The implementation is straightforward; I am seeking
> feedback on the new option's name, meaning and its
> default value.
> Add --warn-dead-procs-with-live-siblings.
> Add the option, with the default being "no".
> If a predicate has two or more procedures, and some are live and
> some are dead, generate a warning for the dead procedures only if
> --warn-dead-procs-with-live-siblings was given.
> The set of warnings we get with the four possible combinations
> of the new option with the old --warn-dead-procs option are these.
> --no-warn-dead-procs, --no-warn-dead-procs-with-live-siblings:
> No warnings at all. The default situation.
> --no-warn-dead-procs, --warn-dead-procs-with-live-siblings:
> Cannot happen: --warn-dead-procs-with-live-siblings automatically
> imples --warn-dead-procs.
> --warn-dead-procs, --no-warn-dead-procs-with-live-siblings:
> Warn about all dead procedures that do NOT have any live siblings;
> keep silent about dead procedures that DO have live siblings.
> This is what happens if the user specifies only --warn-dead-procs.
> --warn-dead-procs, --warn-dead-procs-with-live-siblings:
> Warn about all dead procedures, regardless of whether their siblings
> are live. This is what happens if the user specifies
> --warn-dead-procs-with-live-siblings, with or without specifying
I agree with the default behaviours.
Perhaps name the option --warn-all-dead-procs instead.
> diff --git a/compiler/options.m b/compiler/options.m
> index ebbbf1f..296e91d 100644
> --- a/compiler/options.m
> +++ b/compiler/options.m
> @@ -3547,6 +3552,10 @@ options_help_warning -->
> "\tWarn about procedures which are never called.",
> + "--warn-dead-procs-with-live-siblings",
> + "\tWarn about procedures which are never called, even if some",
> + "\tother procedure of the same predicate or function *is* called.",
> + "--no-warn-target-code",
> "\tDisable warnings from the compiler used to process the",
> "\ttarget code (e.g. gcc).",
Delete the first --no-warn-target-code line.
More information about the reviews