This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/68322] New: -Wodr warning on templates should list the instantiation
- From: "thiago at kde dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Nov 2015 00:46:53 +0000
- Subject: [Bug lto/68322] New: -Wodr warning on templates should list the instantiation
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68322
Bug ID: 68322
Summary: -Wodr warning on templates should list the
instantiation
Product: gcc
Version: 5.2.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: thiago at kde dot org
Target Milestone: ---
When compiling a certain part of Qt, I get:
qshareddata.h:129:26: warning: type âstruct QExplicitlySharedDataPointerâ
violates one definition rule [-Wodr]
template <class T> class QExplicitlySharedDataPointer
^
qshareddata.h:129:26: note: a different type is defined in another translation
unit
qshareddata.h:215:8: note: the first difference of corresponding definitions is
field âdâ
T *d;
^
The warning itself is bogus (probably bug 66180), but regardless of that, the
warning output should list which instantiation of the template class the
compiler is talking about.