Commit 3fe3efe
gcc: Make strchr return value pointers const
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.
This matches similar variables outside of the ifdefs for dos-like
path handling.
2020-09-07 Martin Storsjö <[email protected]>
gcc/
* dwarf2out.c (file_name_acquire): Make a strchr return value
pointer to const.
libcpp/
* files.c (remap_filename): Make a strchr return value pointer
to const.1 parent 2b0df0a commit 3fe3efe
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12118 | 12118 | | |
12119 | 12119 | | |
12120 | 12120 | | |
12121 | | - | |
| 12121 | + | |
12122 | 12122 | | |
12123 | 12123 | | |
12124 | 12124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1693 | 1693 | | |
1694 | 1694 | | |
1695 | 1695 | | |
1696 | | - | |
| 1696 | + | |
1697 | 1697 | | |
1698 | 1698 | | |
1699 | 1699 | | |
| |||
0 commit comments