This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Unable to build gas/config/tc-riscv.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]