https://sourceware.org/bugzilla/show_bug.cgi?id=19587
Bug ID: 19587 Summary: Some of the less-well used targets won't compile with gcc-6 due to static vars in opcode headers Product: binutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: dhowells at redhat dot com Target Milestone: --- gcc-6 added a new warning -Wunused-const-variable that causes unused constant variables to generate a warning. Binutils adds -Werror to the build which turns this into an error. The opcode header files define a bunch of static constant variables, mostly arrays, that now fall foul of this. Errors like the following are generated: ../../binutils-2.26/opcodes/../include/opcode/metag.h:686:30: error: 'metag_scondtab' defined but not used [-Werror=unused-const-variable] This error can be suppressed by adding -Wno-unused-const-variable to the build. Note that whilst -Wno-error=unused-const-variable could be used with gcc-6, it cannot be used with anything older. The following are all potential problems: warthog>git grep "static const.*=" master -- include/opcode/*.h | sed s/master:// include/opcode/dlx.h:static const struct dlx_opcode dlx_opcodes[] = include/opcode/hppa.h:static const char *const completer_chars = ",CcY<>?!@+&U~FfGHINnOoZMadu|/=0123%e$m}"; include/opcode/hppa.h:static const struct pa_opcode pa_opcodes[] = include/opcode/i860.h:static const struct i860_opcode i860_opcodes[] = include/opcode/metag.h:static const metag_reg metag_regtab[] = include/opcode/metag.h:static const metag_reg metag_dsp_regtab[] = include/opcode/metag.h:static const metag_reg metag_dsp_tmpl_regtab[2][56] = include/opcode/metag.h:static const metag_acf metag_acftab[] = include/opcode/metag.h:static const split_condition metag_scondtab[] = include/opcode/metag.h:static const split_condition metag_dsp_scondtab[] = include/opcode/metag.h:static const split_condition metag_fpu_scondtab[] = include/opcode/metag.h:static const insn_template metag_optab[] = include/opcode/mips.h:static const unsigned int mips_isa_table[] = { include/opcode/nds32.h:static const int nds32_r45map[] = include/opcode/nds32.h:static const int nds32_r54map[] = include/opcode/ns32k.h:static const struct ns32k_opcode ns32k_opcodes[]= include/opcode/score-datadep.h:static const struct insn_to_dependency insn_to_dependency_table[] = include/opcode/score-datadep.h:static const struct data_dependency data_dependency_table[] = include/opcode/tic30.h:static const reg tic30_regtab[] = { include/opcode/tic30.h:static const ind_addr_type tic30_indaddr_tab[] = { include/opcode/tic30.h:static const insn_template tic30_optab[] = { include/opcode/tic30.h:static const insn_template *const tic30_optab_end = include/opcode/tic30.h:static const partemplate tic30_paroptab[] = { include/opcode/tic30.h:static const partemplate *const tic30_paroptab_end = include/opcode/tic4x.h:static const tic4x_register_t tic3x_registers[] = include/opcode/tic4x.h:static const tic4x_register_t tic4x_registers[] = include/opcode/tic4x.h:static const tic4x_cond_t tic4x_conds[] = include/opcode/tic4x.h:static const tic4x_indirect_t tic4x_indirects[] = include/opcode/tic4x.h:static const tic4x_inst_t tic4x_insts[] = include/opcode/visium.h:static const struct reg_entry gen_reg_table[] = include/opcode/visium.h:static const struct reg_entry fp_reg_table[] = -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils