This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Unable to build gas/config/tc-riscv.c
- From: Nick Clifton <nickc at redhat dot com>
- To: palmer at dabbelt dot com
- Cc: binutils at sourceware dot org
- Date: Mon, 03 Apr 2017 10:43:21 +0100
- Subject: Unable to build gas/config/tc-riscv.c
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=nickc at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2E47F88E60
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2E47F88E60
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