On Sat, Feb 01, 2020 at 07:30:15AM +0000, Bernd Edlinger wrote:
> @@ -239,20 +243,86 @@ colorize_init (diagnostic_color_rule_t rule)
>      }
>  }
>  
> +/* Return URL_FORMAT_XXX which tells how we should emit urls
> +   when in always mode.
> +   We use GCC_URLS and if that is not defined TERM_URLS.
> +   If neither is defined the feature is enabled by default.  */
> +
> +static diagnostic_url_format
> +parse_gcc_urls()

Formatting, missing space before (.

> diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
> index 6ffafac..59d7ecd 100644
> --- a/gcc/doc/install.texi
> +++ b/gcc/doc/install.texi
> @@ -2097,9 +2097,18 @@ option (if not used explicitly on the command line).  
> @var{choice}
>  can be one of @samp{never}, @samp{auto}, @samp{always}, and 
> @samp{auto-if-env}
>  where @samp{auto} is the default.  @samp{auto-if-env} means that
>  @option{-fdiagnostics-color=auto} will be the default if @code{GCC_COLORS}
> -is present and non-empty in the environment, and
> +is present and non-empty in the environment at runtime, and
>  @option{-fdiagnostics-color=never} otherwise.

I'm not sure "at runtime" is the right term here, usually we talk about
runtime when running the program produced by gcc, not about compile time.
So perhaps try to be even more verbose and say "in the environment of the
compiler" or so?

> +The default depends on how the compiler has been configured.
> +it can be any of the above @var{WHEN} options.

After full stop next sentence should start with capital letter.

> +
> +GCC can also be configured (via the
> +@option{--with-diagnostics-urls=auto-if-env} configure-time option)
> +so that the default is affected by environment variables.
> +Under such a configuration, GCC defaults to using @samp{auto}
> +if either @env{GCC_URLS} or @env{TERM_URLS} environment variables are
> +present in the environment, or @samp{never} if neither are.
> +
> +But even with @option{-fdiagnostics-urls=always} the behavior will be
> +dependent on those environmen variables:

I know I start sentences with But all the time, but some style guides are
against that, not sure if we want to do that in the documentation.

        Jakub

Reply via email to