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

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathaniel Shead <[email protected]>:

https://gcc.gnu.org/g:64125642775fc485a58bda8df4401b667682254f

commit r16-7626-g64125642775fc485a58bda8df4401b667682254f
Author: Nathaniel Shead <[email protected]>
Date:   Sun Feb 22 13:09:00 2026 +1100

    driver: Escape special characters in '-fdeps-{file,target}' [PR120974]

    The driver uses the 'join' function to calculate the default output for
    the -fdeps-file and -fdeps-target parameters from the parameter given to
    -o (or the basename of the input file).  But if the path given to -o has
    any whitespace in it this causes cc1plus to see arguments like

      "-o some file.o" "-fdeps-file=some" "file.ddi"

    which breaks.  Fixed by adjusting the 'join' function to escape any
    special characters in the result.

            PR c++/120974

    gcc/ChangeLog:

            * gcc.cc (join_spec_func): Escape special characters.

    Signed-off-by: Nathaniel Shead <[email protected]>
    Reviewed-by: Jason Merrill <[email protected]>

Reply via email to