This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [changes.html] Document -fdiagnostics-color= default changes


On Fri, Nov 14, 2014 at 8:42 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Thu, Nov 13, 2014 at 05:54:46PM -0700, Jeff Law wrote:
>> On 11/12/14 15:33, Jakub Jelinek wrote:
>> >This patch makes the -fdiagnostics-color= default configurable, and
>> >changes the default (if no configure option is specified for it)
>> >to --with-diagnostics-color=auto.  The previous behavior can be
>> >restored with --with-diagnostics-color=auto-if-env , the 4.8
>> >behavior (never coloring anything) with --with-diagnostics-color=never .
>> >Bootstrapped/regtested on x86_64-linux and i686-linux and tested with
>> >all 5 different configure options (the four explicit one and without).
>> >Ok for trunk?
>> >
>> >2014-11-12  Jakub Jelinek  <jakub@redhat.com>
>> >
>> >     * configure.ac (--with-diagnostics-color): New configure
>> >     option, default to --with-diagnostics-color=auto.
>> >     * toplev.c (process_options): Use DIAGNOSTICS_COLOR_DEFAULT
>> >     to determine -fdiagnostics-color= option default.
>> >     * doc/invoke.texi (-fdiagnostics-color=): Document new
>> >     default.
>> >     * configure: Regenerated.
>> >     * config.in: Regenerated.
>> OK.  Should the change in default behaviour be mentioned somewhere?
>
> Like this?
>
> --- gcc-5/changes.html  12 Nov 2014 14:40:55 -0000      1.22
> +++ gcc-5/changes.html  14 Nov 2014 07:39:36 -0000
> @@ -43,6 +43,17 @@
>
>  <h3 id="c-family">C family</h3>
>    <ul>
> +    <li>The <code>-fdiagnostics-color=</code> option default is now
> +       configurable at GCC configury time using
> +       <code>--with-diagnostics-color=</code>, can default to
> +       <code>auto</code> - the new default unless configured otherwise,
> +       where diagnostics is colorized by default when emitted to terminal,
> +       <code>never</code>, <code>always</code> or <code>auto-if-env</code>,
> +       which is the default of GCC 4.9 - <code>auto</code> if non-empty
> +       <code>GCC_COLORS</code> is in the environment, <code>never</code>
> +       otherwise.  Note, as before, having empty <code>GCC_COLORS</code>
> +       variable in the environment will always turn the coloring off, no
> +       matter what the default is or what command line options are used.</li>
>      <li>A new command-line option <code>-Wswitch-bool</code> has been added for
>         the C and C++ compilers, which warns whenever a <code>switch</code>
>         statement has an index of boolean type.</li>

Ok.

> doc/invoke.texi also talks about it, wonder if it shouldn't be mentioned
> elsewhere, install.texi?

Sure - the configure option should be mentioned in install.texi as well.

Thanks,
Richard.

>         Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]