]> git.ipfire.org Git - thirdparty/gcc.git/commit
driver: fix crash with --diagnostics-plain-output [PR117942]
authorMarek Polacek <polacek@redhat.com>
Mon, 9 Dec 2024 13:19:35 +0000 (08:19 -0500)
committerMarek Polacek <polacek@redhat.com>
Fri, 13 Dec 2024 17:25:54 +0000 (12:25 -0500)
commit3454cca24a92a535a46fe4ec9d5d41585002fc4b
tree5cc9c4f454cea88c711a73e57a6ae2a54006e80b
parent2fd2f40e0461e21df0a2f5ead083d53b641d2a86
driver: fix crash with --diagnostics-plain-output [PR117942]

We are crashing here because decode_cmdline_options_to_array has:

  if (!strcmp (opt, "-fdiagnostics-plain-output"))
    ...

but that doesn't handle the '--FLAG' variant.

PR driver/117942

gcc/ChangeLog:

* opts-common.cc (decode_cmdline_options_to_array): Also detect
--diagnostics-plain-output.

Reviewed-by: Joseph Myers <josmyers@redhat.com>
(cherry picked from commit be2062be9a629ae18a0c87c6b9cbe1885978417e)
gcc/opts-common.cc