Patch to remove the use of the c++ keyword class in binutil sources.

Martin Thuresson martin@mtme.org
Thu Jun 25 06:04:00 GMT 2009


Hello,

This patch updates various variable and member names from class to
something (hopefully) more descriptive. This is a series of patches I
hope to submit to make it more compatible with C++ compilers.

I have compiled the this following list of targes and made sure that
"make check" produce the same result for all of them.

alpha-freebsd
alpha-linux
arc-elf
arm-eabi
arm-aout
cr16-linux
cris-linux
crx-linux
d30v-linux
dlx-elf
hppa-linux
i370-linux
i686-linux
x86_64-linux
i960-elf
ia64-linux
iq2000-elf
m32c-elf
m32r-linux
m68hc11-linux
m68k-linux
mcore-elf
mep-elf
mips-linux
mmix-linux
mn10300-linux
moxie-elf
ns32k-netbsd
pj-linux
ppc-linux
s390-linux
score-elf
sh-linux
sparc-linux
spu-elf
vax-linux
xtensa-linux

Thanks,
Martin Thuresson

2009-06-24  Martin Thuresson  <martin@mtme.org>

	Updated sources to avoid using the name class, which is a keyword in c++.
	
	* bfd/coff-i960.c (coff_i960_relocate_section) Rename variable class to
	class_val.
	* bfd/coff-rs6000.c (_bfd_xcoff_swap_aux_in, _bfd_xcoff_swap_aux_out):
	Rename arguments class to in_class.
	* bfd/coffcode.h (coff_pointerize_aux_hook): Rename variable class to
	n_sclass.
	* bfd/coffgen.c (coff_write_symbol,coff_pointerize_aux): Rename
	variables named class to n_sclass.
	(coff_write_symbols): Rename variable class to sym_class.
	(bfd_coff_set_symbol_class): Rename argument class to symbol_class.
	* bfd/cofflink.c (_bfd_coff_link_hash_newfunc,coff_link_add_symbols,
	_bfd_coff_link_input_bfd,_bfd_coff_write_global_sym,
	_bfd_coff_generic_relocate_section): Update code to use renamed members.
	* bfd/coffswap.h(coff_swap_aux_in,coff_swap_aux_out): Rename argument
	class to in_class.
	* bfd/libcoff-in.h (struct coff_link_hash_entry,
	struct coff_debug_merge_type) Renamed members class to symbol_class.
	* bfd/libcoff.h Regenerated
	* bfd/peXXigen.c (_bfd_XXi_swap_aux_in,_bfd_XXi_swap_aux_out): Rename
	argument class to in_class.
	* binutils/ieee.c (ieee_read_cxx_misc,ieee_read_cxx_class,
	ieee_read_reference): Rename variables named class to cxxclass.
	* gas/config/tc-arc.c (struct syntax_classes): Rename member class to
	s_class
	(arc_extinst): Rename variable class to s_class.
	* gas/config/tc-mips.c (insn_uses_reg): Rename argument class to
	regclass.
	* gas/config/tc-score.c (s3_adjust_paritybit): Rename argument class to
	i_class.
	* gas/config/tc-score7.c (s3_adjust_paritybit): Rename argument class to
	i_class
	* gprof/corefile.c (core_create_function_syms): Rename variable class to
	cxxclass.
	* include/opcode/ia64.h	(struct ia64_operand): Renamed member class to
	op_class
	* ld/emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): Rename
	variable class to link_class
	(gld${EMULATION_NAME}_try_needed): Rename variable class to link_class.
	* opcodes/ia64-dis.c: (print_insn_ia64)  Update code to use renamed
	member.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: class.patch
Type: application/octet-stream
Size: 46857 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090625/86adda57/attachment.obj>


More information about the Binutils mailing list