[binutils-gdb] z80: avoid error with newer compilers due to lost "const"
Jan Beulich
jbeulich@sourceware.org
Tue Sep 8 15:08:50 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2f65efd9b6061ff1870f49aaa49edb1529368a73
commit 2f65efd9b6061ff1870f49aaa49edb1529368a73
Author: H. Peter Anvin <hpa@zytor.com>
Date: Tue Sep 8 17:05:49 2026 +0200
z80: avoid error with newer compilers due to lost "const"
With newer gcc+glibc (16.2.1, 2.43) bsearch() and many other functions
propagate "const"-ness. This causes a build error in tc-z80.c.
The pointer that is missing "const" is never written to, so simply fix
it by adding the missing "const".
This bug has existed since the Z80 target was introduced.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diff:
---
gas/config/tc-z80.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gas/config/tc-z80.c b/gas/config/tc-z80.c
index 5c9fc2fa813..ad228ace7cc 100644
--- a/gas/config/tc-z80.c
+++ b/gas/config/tc-z80.c
@@ -1086,7 +1086,7 @@ parse_cc (const char *s, char * op)
{
const char *p;
int i;
- struct reg_entry * cc_p;
+ const struct reg_entry *cc_p;
for (i = 0; i < BUFLEN; ++i)
{
More information about the Binutils-cvs
mailing list