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 lto/68322] New: -Wodr warning on templates should list the instantiation


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.

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