https://gcc.gnu.org/g:2918eed569574b0c2136256b9898a3287135a899
commit r17-1749-g2918eed569574b0c2136256b9898a3287135a899 Author: Filip Kastl <[email protected]> Date: Mon Jun 22 11:50:31 2026 +0200 lto-plugin.c: c23 compatibility: char * -> const char * There are two uses of strrchr with const char * parameters in lto-plugin.c where the result gets assigned to a non-const char * variable. Make the variable const char * so that we don't throw away const-ness. I've seen clang produce warnings about this when compiling lto-plugin.c. Regtested and bootstrapped on x86_64 linux. lto-plugin/ChangeLog: * lto-plugin.c (process_symtab): char *s -> const char *s. (process_symtab_extension): Ditto. Signed-off-by: Filip Kastl <[email protected]> Diff: --- lto-plugin/lto-plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c index 8cd707087e72..778c3d21165a 100644 --- a/lto-plugin/lto-plugin.c +++ b/lto-plugin/lto-plugin.c @@ -1091,7 +1091,7 @@ static int process_symtab (void *data, const char *name, off_t offset, off_t length) { struct plugin_objfile *obj = (struct plugin_objfile *)data; - char *s; + const char *s; char *secdatastart, *secdata; if (!startswith (name, ".gnu.lto_.symtab")) @@ -1143,7 +1143,7 @@ process_symtab_extension (void *data, const char *name, off_t offset, off_t length) { struct plugin_objfile *obj = (struct plugin_objfile *)data; - char *s; + const char *s; char *secdatastart, *secdata; if (!startswith (name, ".gnu.lto_.ext_symtab"))
