Hi,

On Fri, 4 Sep 2020, Jakub Jelinek wrote:

On Tue, Sep 01, 2020 at 04:01:42PM +0300, Martin Storsjö wrote:
This fixes compilation of codepaths for dos-like filesystems
with Clang. When built with clang, it treats C input files as C++
when the compiler driver is invoked in C++ mode, triggering errors
when the return value of strchr() on a pointer to const is assigned
to a pointer to non-const variable.

Not really specific to clang, e.g. glibc does that in its headers too
as the C++ standard mandates that (and I guess mingw should do that too).

This matches similar variables outside of the ifdefs for dos-like
path handling.

2020-09-01  Martin Storsjö  <mar...@martin.st>

gcc/Changelog:
        * dwarf2out.c (file_name_acquire): Make a strchr return value
        pointer to const.

libcpp/Changelog:
        * files.c (remap_filename): Make a strchr return value pointer
        to const.

LGTM.  And it is short enough not to need copyright assignment, so ok for
trunk.

Thanks! Can someone commit this for me?

// Martin

Reply via email to