public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings
@ 2024-05-08  2:39 xry111 at gcc dot gnu.org
  2024-05-08  2:47 ` [Bug other/114980] " xry111 at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: xry111 at gcc dot gnu.org @ 2024-05-08  2:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114980

            Bug ID: 114980
           Summary: [14/15 Regression] -fdiagnostics-urls=never does not
                    suppress URLs in `'-Werror=' argument '-Werror=...'
                    not valid for ...` warnings
           Product: gcc
           Version: 14.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xry111 at gcc dot gnu.org
  Target Milestone: ---

$ cat hw.c
#include <stdio.h>

int
main ()
{
  printf ("Hello, world.\n");
}
$ env -i PATH=$PATH TERM=xterm-256colors LANG= cc hw.c -fdiagnostics-urls=never
-Werror=target-lifetime
cc1: warning: '-Werror=' argument '-Werror=target-lifetime' is not valid for C

But with GCC 14.1.0 the "-Werror" and "-Werror=target-lifetime" are hyperlinks.
 This causes several test failures like:

spawn -ignore SIGHUP /home/xry111/sources/lfs/gcc-14.1.0/build/gcc/xgcc
-B/home/xry111/sources/lfs/gcc-14.1.0/build/gcc/
/home/xry111/sources/lfs/gcc-14.1.0/gcc/testsuite/gcc.dg/pr91172.c
-fdiagnostics-plain-output -Werror=target-lifetime -S -o pr91172.s
cc1: warning:
'^[]8;;https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Werror^G-Werror=^[]8;;^G'
argument
'^[]8;;https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Werror^G-Werror=target-lifetime^[]8;;^G'
is not valid for C
FAIL: gcc.dg/pr91172.c  at line 3 (test for warnings, line ) 
FAIL: gcc.dg/pr91172.c (test for excess errors)
Excess errors:
cc1: warning:
'^[]8;;https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Werror^G-Werror=^[]8;;^G'
argument
'^[]8;;https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Werror^G-Werror=target-lifetime^[]8;;^G'
is not valid for C

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug other/114980] [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings
  2024-05-08  2:39 [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings xry111 at gcc dot gnu.org
@ 2024-05-08  2:47 ` xry111 at gcc dot gnu.org
  2024-05-08  2:49 ` pinskia at gcc dot gnu.org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: xry111 at gcc dot gnu.org @ 2024-05-08  2:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114980

--- Comment #1 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Also happens for "command-line option ... is valid for ... but not for ..."
warnings:

$ env -i PATH=$PATH TERM=xterm-256colors cc hw.c -fdiagnostics-urls=never
-Wtarget-lifetime
cc1: warning: command-line option '-Wtarget-lifetime' is valid for Fortran but
not for C

-Wtarget-lifetime has become a hyperlink.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug other/114980] [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings
  2024-05-08  2:39 [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings xry111 at gcc dot gnu.org
  2024-05-08  2:47 ` [Bug other/114980] " xry111 at gcc dot gnu.org
@ 2024-05-08  2:49 ` pinskia at gcc dot gnu.org
  2024-05-08  2:50 ` xry111 at gcc dot gnu.org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-08  2:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114980

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I have not seen this failure ...

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug other/114980] [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings
  2024-05-08  2:39 [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings xry111 at gcc dot gnu.org
  2024-05-08  2:47 ` [Bug other/114980] " xry111 at gcc dot gnu.org
  2024-05-08  2:49 ` pinskia at gcc dot gnu.org
@ 2024-05-08  2:50 ` xry111 at gcc dot gnu.org
  2024-05-08  2:52 ` pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: xry111 at gcc dot gnu.org @ 2024-05-08  2:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114980

--- Comment #3 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> I have not seen this failure ...

Yes it's strange.  I didn't see the failures building 14.1.0-RC1 but I saw them
building 14.1.0, though RC1 definitely outputs the hyperlink like 14.1.0.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug other/114980] [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings
  2024-05-08  2:39 [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings xry111 at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-05-08  2:50 ` xry111 at gcc dot gnu.org
@ 2024-05-08  2:52 ` pinskia at gcc dot gnu.org
  2024-05-08  2:56 ` xry111 at gcc dot gnu.org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-08  2:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114980

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
-fdiagnostics-plain-output does:
          /* If you have changed the default diagnostics output, and this new
             output is not appropriately "plain" (e.g., the change needs to be
             undone in order for the testsuite to work properly), then please
do
             the following:
                 1.  Add the necessary option to undo the new behavior to
                     the array below.
                 2.  Update the documentation for -fdiagnostics-plain-output
                     in invoke.texi.  */
          const char *const expanded_args[] = {
            "-fno-diagnostics-show-caret",
            "-fno-diagnostics-show-line-numbers",
            "-fdiagnostics-color=never",
            "-fdiagnostics-urls=never",
            "-fdiagnostics-path-format=separate-events",
            "-fdiagnostics-text-art-charset=none"
          };

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug other/114980] [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings
  2024-05-08  2:39 [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings xry111 at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-05-08  2:52 ` pinskia at gcc dot gnu.org
@ 2024-05-08  2:56 ` xry111 at gcc dot gnu.org
  2024-05-08  2:58 ` xry111 at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: xry111 at gcc dot gnu.org @ 2024-05-08  2:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114980

--- Comment #5 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> -fdiagnostics-plain-output does:
>           /* If you have changed the default diagnostics output, and this new
>              output is not appropriately "plain" (e.g., the change needs to
> be
>              undone in order for the testsuite to work properly), then
> please do
>              the following:
>                  1.  Add the necessary option to undo the new behavior to
>                      the array below.
>                  2.  Update the documentation for -fdiagnostics-plain-output
>                      in invoke.texi.  */
>           const char *const expanded_args[] = {
>             "-fno-diagnostics-show-caret",
>             "-fno-diagnostics-show-line-numbers",
>             "-fdiagnostics-color=never",
>             "-fdiagnostics-urls=never",
>             "-fdiagnostics-path-format=separate-events",
>             "-fdiagnostics-text-art-charset=none"
>           };

The problem is -fdiagnostics-urls=never itself seems not working.

Note that if I invoke cc1 directly and put -fdiagnostics-urls=never *before*
the offending option:

echo "" | LANG= ./gcc/cc1 -fdiagnostics-urls=never -Wtarget-lifetime -x c -
cc1: warning: command-line option '-Wtarget-lifetime' is valid for Fortran but
not for C

It works.  But if I put it *after* the offending option:

echo "" | LANG= ./gcc/cc1 -Wtarget-lifetime -fdiagnostics-urls=never -x c -
cc1: warning: command-line option '-Wtarget-lifetime' is valid for Fortran but
not for C

-Wtarget-lifetime in the message becomes a link.

However if I invoke the driver (xgcc) -fdiagnostics-urls=never just does not
work no matter before -Wtarget-lifetime or after it.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug other/114980] [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings
  2024-05-08  2:39 [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings xry111 at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-05-08  2:56 ` xry111 at gcc dot gnu.org
@ 2024-05-08  2:58 ` xry111 at gcc dot gnu.org
  2024-05-08  3:21 ` xry111 at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: xry111 at gcc dot gnu.org @ 2024-05-08  2:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114980

--- Comment #6 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Looks like when the driver invokes cc1, -fdiagnostics-urls=never seems always
after -W... options:

$ echo "" | LANG= ./gcc/xgcc -fdiagnostics-urls=never -Wtarget-lifetime -x c -
-B gcc -v -c
Reading specs from gcc/specs
COLLECT_GCC=./gcc/xgcc
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/usr LD=ld --enable-languages=c,c++
--enable-default-pie --enable-default-ssp --disable-multilib
--disable-bootstrap --disable-fixincludes --with-system-zlib --enable-host-pie
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.0 20240507 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-fdiagnostics-urls=never' '-Wtarget-lifetime' '-B' 'gcc'
'-v' '-c' '-mtune=generic' '-march=x86-64'
 gcc/cc1 -quiet -v -iprefix
/home/xry111/git-repos/gcc-build/gcc/../lib/gcc/x86_64-pc-linux-gnu/15.0.0/
-isystem gcc/include -isystem gcc/include-fixed - -quiet -dumpbase -
-mtune=generic -march=x86-64 -Wtarget-lifetime -version
-fdiagnostics-urls=never -o /tmp/ccqETyrO.s
cc1: warning: command-line option '-Wtarget-lifetime' is valid for Fortran but
not for C

... ...

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug other/114980] [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings
  2024-05-08  2:39 [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings xry111 at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-05-08  2:58 ` xry111 at gcc dot gnu.org
@ 2024-05-08  3:21 ` xry111 at gcc dot gnu.org
  2024-05-08  3:25 ` [Bug driver/114980] " xry111 at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: xry111 at gcc dot gnu.org @ 2024-05-08  3:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114980

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-05-08
           Assignee|unassigned at gcc dot gnu.org      |xry111 at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1

--- Comment #7 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Patch only tested barely:

diff --git a/gcc/opts-common.cc b/gcc/opts-common.cc
index 4a2dff243b0..2d1e86ff94f 100644
--- a/gcc/opts-common.cc
+++ b/gcc/opts-common.cc
@@ -1152,6 +1152,7 @@ prune_options (struct cl_decoded_option
**decoded_options,
   unsigned int options_to_prepend = 0;
   unsigned int Wcomplain_wrong_lang_idx = 0;
   unsigned int fdiagnostics_color_idx = 0;
+  unsigned int fdiagnostics_urls_idx = 0;

   /* Remove arguments which are negated by others after them.  */
   new_decoded_options_count = 0;
@@ -1185,6 +1186,12 @@ prune_options (struct cl_decoded_option
**decoded_options,
            ++options_to_prepend;
          fdiagnostics_color_idx = i;
          continue;
+       case OPT_fdiagnostics_urls_:
+         gcc_checking_assert (i != 0);
+         if (fdiagnostics_urls_idx == 0)
+           ++options_to_prepend;
+         fdiagnostics_urls_idx = i;
+         continue;

        default:
          gcc_assert (opt_idx < cl_options_count);
@@ -1248,6 +1255,12 @@ keep:
            = old_decoded_options[fdiagnostics_color_idx];
          new_decoded_options_count++;
        }
+      if (fdiagnostics_urls_idx != 0)
+       {
+         new_decoded_options[argv_0 + options_prepended++]
+           = old_decoded_options[fdiagnostics_urls_idx];
+         new_decoded_options_count++;
+       }
       gcc_checking_assert (options_to_prepend == options_prepended);
     }

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug driver/114980] [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings
  2024-05-08  2:39 [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings xry111 at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-05-08  3:21 ` xry111 at gcc dot gnu.org
@ 2024-05-08  3:25 ` xry111 at gcc dot gnu.org
  2024-05-08  5:58 ` xry111 at gcc dot gnu.org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: xry111 at gcc dot gnu.org @ 2024-05-08  3:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114980

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=67640

--- Comment #8 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Very similar to PR67640.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug driver/114980] [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings
  2024-05-08  2:39 [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings xry111 at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2024-05-08  3:25 ` [Bug driver/114980] " xry111 at gcc dot gnu.org
@ 2024-05-08  5:58 ` xry111 at gcc dot gnu.org
  2024-05-08  8:20 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: xry111 at gcc dot gnu.org @ 2024-05-08  5:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114980

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch

--- Comment #9 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
https://gcc.gnu.org/pipermail/gcc-patches/2024-May/651026.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug driver/114980] [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings
  2024-05-08  2:39 [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings xry111 at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2024-05-08  5:58 ` xry111 at gcc dot gnu.org
@ 2024-05-08  8:20 ` rguenth at gcc dot gnu.org
  2024-05-10  3:20 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-05-08  8:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114980

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.2

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug driver/114980] [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings
  2024-05-08  2:39 [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings xry111 at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2024-05-08  8:20 ` rguenth at gcc dot gnu.org
@ 2024-05-10  3:20 ` cvs-commit at gcc dot gnu.org
  2024-05-10  3:21 ` cvs-commit at gcc dot gnu.org
  2024-05-10  3:22 ` xry111 at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-10  3:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114980

--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Xi Ruoyao <xry111@gcc.gnu.org>:

https://gcc.gnu.org/g:f75806ec63ec1af2d76a194e5fa73e114b2b8857

commit r15-355-gf75806ec63ec1af2d76a194e5fa73e114b2b8857
Author: Xi Ruoyao <xry111@xry111.site>
Date:   Wed May 8 11:25:57 2024 +0800

    driver: Move -fdiagnostics-urls= early like -fdiagnostics-color= [PR114980]

    In GCC 14 we started to emit URLs for "command-line option <option> is
    valid for <language> but not <another language>" and "-Werror= argument
    '-Werror=<option>' is not valid for <language>" warnings.  So we should
    have moved -fdiagnostics-urls= early like -fdiagnostics-color=, or
    -fdiagnostics-urls= wouldn't be able to control URLs in these warnings.

    No test cases are added because with TERM=xterm-256colors PR114980
    already triggers some test failures.

    gcc/ChangeLog:

            PR driver/114980
            * opts-common.cc (prune_options): Move -fdiagnostics-urls=
            early like -fdiagnostics-color=.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug driver/114980] [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings
  2024-05-08  2:39 [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings xry111 at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2024-05-10  3:20 ` cvs-commit at gcc dot gnu.org
@ 2024-05-10  3:21 ` cvs-commit at gcc dot gnu.org
  2024-05-10  3:22 ` xry111 at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-10  3:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114980

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Xi Ruoyao <xry111@gcc.gnu.org>:

https://gcc.gnu.org/g:21051de4bed3d541804bf965cbdc3e8047698777

commit r14-10192-g21051de4bed3d541804bf965cbdc3e8047698777
Author: Xi Ruoyao <xry111@xry111.site>
Date:   Wed May 8 11:25:57 2024 +0800

    driver: Move -fdiagnostics-urls= early like -fdiagnostics-color= [PR114980]

    In GCC 14 we started to emit URLs for "command-line option <option> is
    valid for <language> but not <another language>" and "-Werror= argument
    '-Werror=<option>' is not valid for <language>" warnings.  So we should
    have moved -fdiagnostics-urls= early like -fdiagnostics-color=, or
    -fdiagnostics-urls= wouldn't be able to control URLs in these warnings.

    No test cases are added because with TERM=xterm-256colors PR114980
    already triggers some test failures.

    gcc/ChangeLog:

            PR driver/114980
            * opts-common.cc (prune_options): Move -fdiagnostics-urls=
            early like -fdiagnostics-color=.

    (cherry picked from commit f75806ec63ec1af2d76a194e5fa73e114b2b8857)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug driver/114980] [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings
  2024-05-08  2:39 [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings xry111 at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2024-05-10  3:21 ` cvs-commit at gcc dot gnu.org
@ 2024-05-10  3:22 ` xry111 at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: xry111 at gcc dot gnu.org @ 2024-05-10  3:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114980

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #12 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Fixed for 14/15.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-05-10  3:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-08  2:39 [Bug other/114980] New: [14/15 Regression] -fdiagnostics-urls=never does not suppress URLs in `'-Werror=' argument '-Werror=...' not valid for ...` warnings xry111 at gcc dot gnu.org
2024-05-08  2:47 ` [Bug other/114980] " xry111 at gcc dot gnu.org
2024-05-08  2:49 ` pinskia at gcc dot gnu.org
2024-05-08  2:50 ` xry111 at gcc dot gnu.org
2024-05-08  2:52 ` pinskia at gcc dot gnu.org
2024-05-08  2:56 ` xry111 at gcc dot gnu.org
2024-05-08  2:58 ` xry111 at gcc dot gnu.org
2024-05-08  3:21 ` xry111 at gcc dot gnu.org
2024-05-08  3:25 ` [Bug driver/114980] " xry111 at gcc dot gnu.org
2024-05-08  5:58 ` xry111 at gcc dot gnu.org
2024-05-08  8:20 ` rguenth at gcc dot gnu.org
2024-05-10  3:20 ` cvs-commit at gcc dot gnu.org
2024-05-10  3:21 ` cvs-commit at gcc dot gnu.org
2024-05-10  3:22 ` xry111 at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).