This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81668] LTO ODR warnings are not helpful
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 Aug 2017 14:57:35 +0000
- Subject: [Bug c++/81668] LTO ODR warnings are not helpful
- Auto-submitted: auto-generated
- References: <bug-81668-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81668
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |msebor at gcc dot gnu.org
--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
(In reply to sgunderson from comment #2)
> file; how would I know which one to look
> through to find the two differing definitions?
One thing to try might be to add static_assert() statements to the header(s)
that define these allegedly incompatible symbols (such as struct st_vio) and
using C++ or GCC type traits verify that they and all their members are in fact
of the expected type, independent of any macros (like MYSQL_VIO). If you can
then compile all the translation units successfully without LTO and still get
errors with LTO that would suggest a bug in GCC and might also give more
information to debug it. Otherwise, errors without LTO should point to the
translation units that define the symbols in incompatible ways.