Unable to build gas/config/tc-riscv.c
Nick Clifton
nickc@redhat.com
Mon Apr 3 09:43:00 GMT 2017
Hi Palmer,
I am unable to build tc-riscv.c after your latest update:
gas/config/tc-riscv.c: In function 'riscv_clear_subsets':
gas/config/tc-riscv.c:129:13: error: passing argument 1 of 'free' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
free (riscv_subsets->name);
^~~~~~~~~~~~~
In file included from gas/as.h:58:0,
from gas/config/tc-riscv.c:23:
/usr/include/stdlib.h:444:13: note: expected 'void *' but argument is of type 'const char *'
extern void free (void *__ptr) __THROW;
^~~~
(I am using gcc v6.3.1 from Fedora 25).
I thought about just checking in a patch to add a cast to the free()
invocation, but then I wondered if maybe it would be better to change
the type in the subsets structure, so I will leave this up to you.
Either way, please check in a patch to fix this problem as soon as you
can. Such a patch is pre-approved.
Cheers
Nick
More information about the Binutils
mailing list