This is the mail archive of the gcc@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]

Re: [RFC] Dealing with ODR violations in GCC


On 02/13/2015 07:54 PM, Martin LiÅka wrote:
On 01/15/2015 06:47 AM, Jan Hubicka wrote:
Hello.

I've just finished successfully chromium LTO build and there's list of mainly -Wodr warnings.
I think some of them are false positives?

What of those you consider to be false?
I wonder if we can print just type name so we avoid using the wrong "struct" in place of class...

Thanks,
Martin

../../third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h:295:0: warning: type ???struct WebCryptoEcKeyImportParams??? violates one definition rule [-Wodr]
  class WebCryptoEcKeyImportParams : public WebCryptoAlgorithmParams {
  ^
../../third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h:295:0: note: a different type is defined in another translation unit
  class WebCryptoEcKeyImportParams : public WebCryptoAlgorithmParams {
  ^
../../third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h:307:0: note: the first difference of corresponding definitions is field ???m_namedCurve???
      const WebCryptoNamedCurve m_namedCurve;
  ^
../../third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h:295:0: note: a field of same name but different type is defined in another translation unit
  class WebCryptoEcKeyImportParams : public WebCryptoAlgorithmParams {
  ^

The line info seems wrong here though.
../../third_party/icu/source/common/unicode/bytestream.h:48:0: note: virtual method ???_ZTIN6icu_528ByteSinkE???
  class U_COMMON_API ByteSink : public UMemory {
  ^
<built-in>: note: ought to match virtual method ???__cxa_pure_virtual??? but does not

This message also should be sanitized - we probably want to special case cxa_pure_virtual...

Honza
In function ???__fread_alias???,
     inlined from ???_ZN21SafeBrowsingStoreFile13CheckValidityEv.part.41.constprop??? at ../../chrome/browser/safe_browsing/safe_browsing_store_file.cc:611:0:
/usr/include/bits/stdio2.h:290:0: warning: call to ???__fread_chk_warn??? declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer
   return __fread_chk (__ptr, __bos0 (__ptr), __size, __n, __stream);
  ^
/usr/include/bits/stdio2.h:290:0: warning: call to ???__fread_chk_warn??? declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer
In function ???__read_alias???,
     inlined from ???GetAppOutputInternal.constprop??? at ../../base/process/launch_posix.cc:613:0:
/usr/include/bits/unistd.h:39:0: warning: call to ???__read_chk_warn??? declared with attribute warning: read called with bigger length than size of the destination buffer
   return __read_chk (__fd, __buf, __nbytes, __bos0 (__buf));
  ^



Hello.

There's updated list for Chromium built with LTO.

Martin


Hi.

There's current status of ODR warnings for chrome, inkscape and firefox binaries.

Martin

Attachment: firefox-warnings.txt
Description: Text document

Attachment: chrome-warnings.txt
Description: Text document

Attachment: inkscape-warnings.txt.bz2
Description: application/bzip


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