This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

Re: [PATCH] Get rid of -Wodr warning (PR build/23399)


>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

Simon> The PR reports that building with -Wodr -flto complains about different
Simon> versions of struct ipa_sym_addresses, in common/agent.c and
Simon> gdbserver/tracepoint.c.  This patch renames the version in common to
Simon> ipa_sym_addresses_common to avoid the name clash.  Because the IPA_SYM
Simon> assumed the name ipa_sym_addresses, it now requires the includer to
Simon> define the IPA_SYM_STRUCT_NAME macro to define the name of the structure
Simon> holding the IPA symbol addresses.

Simon> gdb/ChangeLog:

Simon> 	PR build/23399
Simon> 	* common/agent.c (IPA_SYM_STRUCT_NAME): Define.
Simon> 	(struct ipa_sym_addresses): Rename to...
Simon> 	(struct ipa_sym_addresses_common): ... this.
Simon> 	* common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.

Simon> gdb/gdbserver/ChangeLog:

Simon> 	PR build/23399
Simon> 	* tracepoint.c (IPA_SYM_STRUCT_NAME): Define.

Thanks for doing this.  This seems a bit ugly but I didn't see any
obviously better way to go about it.

I was curious if we needed to add -Wodr to the build, but according to
the gcc manual it is enabled by default, so all is well.

Tom


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