This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c++/81668] LTO ODR warnings are not helpful


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81668

--- Comment #2 from sgunderson at bigfoot dot com ---
Running with -fno-diagnostics-show-caret does not help any:

../include/violite.h:288:8: warning: type ‘struct st_vio’ violates the C++ One
Definition Rule [-Wodr]
../include/violite.h:288:0: note: a different type is defined in another
translation unit
../include/violite.h:339:46: note: the first difference of corresponding
definitions is field ‘viodelete’
../include/violite.h:339:0: note: a field of same name but different type is
defined in another translation unit

It's hard for me to look at the preprocessed source code, because I don't know
what to preprocess. Like I said, there's probably a thousand translation units
including this .h file; how would I know which one to look through to find the
two differing definitions?

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