These seems to be last kind of warnings I can not debug in Mozilla. Might be bogus but I don't see how. Honza jh@evans:/abuild/jh/mozilla-central/build10/layout/style> /abuild/jh/trunk-install/bin/g++ -O2 -flto -r -nostdlib tc/*.ii ../../../layout/style/nsCSSStyleRule.cpp: In member function ?DOMCSSStyleRuleImpl* DOMCSSDeclarationImpl::DomRule()?: ../../../layout/style/nsCSSStyleRule.cpp:1037:53: warning: invalid access to non-static data member ?DOMCSSStyleRuleImpl::mDOMDeclaration? of NULL object [-Winvalid-offsetof] ../../../layout/style/nsCSSStyleRule.cpp:1037:53: warning: (perhaps the ?offsetof? macro was used incorrectly) [-Winvalid-offsetof] In file included from ../../../layout/style/nsCSSRuleProcessor.h:52:0, from ../../../layout/style/nsCSSStyleSheet.cpp:48: ../../../layout/style/nsCSSRules.h: In member function ?nsCSSFontFaceRule* nsCSSFontFaceStyleDecl::ContainingRule()?: ../../../layout/style/nsCSSRules.h:292:77: warning: invalid access to non-static data member ?nsCSSFontFaceRule::mDecl? of NULL object [-Winvalid-offsetof] ../../../layout/style/nsCSSRules.h:292:77: warning: (perhaps the ?offsetof? macro was used incorrectly) [-Winvalid-offsetof] ../../../layout/style/nsCSSRules.h: In member function ?const nsCSSFontFaceRule* nsCSSFontFaceStyleDecl::ContainingRule() const?: ../../../layout/style/nsCSSRules.h:299:83: warning: invalid access to non-static data member ?nsCSSFontFaceRule::mDecl? of NULL object [-Winvalid-offsetof] ../../../layout/style/nsCSSRules.h:299:83: warning: (perhaps the ?offsetof? macro was used incorrectly) [-Winvalid-offsetof] In member function ?__base_ctor ?: ../../../layout/style/nsCSSStyleSheet.cpp:1001:23: warning: Use of type ?struct nsCSSStyleSheet? with two mismatching declarations at field ?mRuleProcessors? [enabled by default] ../../../layout/style/nsCSSStyleSheet.h:128:7: note: original type declared here ../../../layout/style/nsCSSStyleSheet.h:294:41: note: field in mismatching type declared here In member function ?__base_ctor ?: ../../../layout/style/nsCSSStyleSheet.cpp:981:23: warning: Use of type ?struct nsCSSStyleSheet? with two mismatching declarations at field ?mRuleProcessors? [enabled by default] ../../../layout/style/nsCSSStyleSheet.h:128:7: note: original type declared here ../../../layout/style/nsCSSStyleSheet.h:294:41: note: field in mismatching type declared here In member function ?__base_dtor ?: ../../../layout/style/nsCSSStyleSheet.cpp:1044:3: warning: Use of type ?struct nsCSSStyleSheet? with two mismatching declarations at field ?mRuleProcessors? [enabled by default] ../../../layout/style/nsCSSStyleSheet.h:128:7: note: original type declared here ../../../layout/style/nsCSSStyleSheet.h:294:41: note: field in mismatching type declared here ../../../layout/style/nsCSSStyleSheet.cpp:1046:27: warning: Use of type ?struct nsCSSStyleSheet? with two mismatching declarations at field ?mRuleProcessors? [enabled by default] ../../../layout/style/nsCSSStyleSheet.h:128:7: note: original type declared here ../../../layout/style/nsCSSStyleSheet.h:294:41: note: field in mismatching type declared here
Created attachment 21175 [details] testcase
Differing array sizes of the mAutoBuf member, type decls: <type_decl 0x7ffff5b22a10 nsAutoTArray type <record_type 0x7ffff5b20c78 nsAutoTArray addressable needs-constructing BLK size <integer_cst 0x7ffff5b2a078 constant 640> unit size <integer_cst 0x7ffff5b13ca8 constant 80> align 64 symtab 0 alias set -1 canonical type 0x7ffff5b20c78 fields <field_decl 0x7ffff5b29980 D.2801 type <record_type 0x7ffff5af3a80 nsTArray> ignored BLK file ../../dist/include/nsTArray.h line 1036 col 7 size <integer_cst 0x7ffff7ed37d0 constant 64> unit size <integer_cst 0x7ffff7ed37f8 constant 8> align 64 offset_align 128 offset <integer_cst 0x7ffff7ed3438 constant 0> bit offset <integer_cst 0x7ffff7ed3b40 constant 0> context <record_type 0x7ffff5b20c78 nsAutoTArray> chain <field_decl 0x7ffff5b29ab0 D.2804>> pointer_to_this <pointer_type 0x7ffff5b44a80>> public BLK file ../../dist/include/nsTArray.h line 1036 col 7 align 8> <type_decl 0x7ffff5af2b80 nsAutoTArray type <record_type 0x7ffff5af39d8 nsAutoTArray addressable needs-constructing BLK size <integer_cst 0x7ffff7ed3f50 constant 192> unit size <integer_cst 0x7ffff7ed3f00 constant 24> align 64 symtab 0 alias set -1 canonical type 0x7ffff5af39d8 fields <field_decl 0x7ffff5af45f0 D.2104 type <record_type 0x7ffff5af3a80 nsTArray> ignored BLK file ../../dist/include/nsTArray.h line 1036 col 7 size <integer_cst 0x7ffff7ed37d0 constant 64> unit size <integer_cst 0x7ffff7ed37f8 constant 8> align 64 offset_align 128 offset <integer_cst 0x7ffff7ed3438 constant 0> bit offset <integer_cst 0x7ffff7ed3b40 constant 0> context <record_type 0x7ffff5af39d8 nsAutoTArray> chain <field_decl 0x7ffff5af4720 D.2107>> pointer_to_this <pointer_type 0x7ffff5b3d9d8>> public BLK file ../../dist/include/nsTArray.h line 1036 col 7 align 8>
Should this (and the other one) not be mentioned upstream somehow?
Seems to be bogus merging of complete/incomplete types.
(In reply to comment #3) > Should this (and the other one) not be mentioned upstream somehow? Honza is filing bugs with them.
Subject: Re: Maybe bogus Use of type ?struct nsCSSStyleSheet? with two mismatching declarations at field ?mRuleProcessors? warnings in Mozilla > Should this (and the other one) not be mentioned upstream somehow? I filled in PRs for the ODR violations at Mozilla side already. Honza
Seems gone now. evans:/abuild/jh/trunk-3/build-inst2/gcc/tc/tc2/:[0]# /abuild/jh/trunk-install/bin/g++ -O2 -flto -r -nostdlib tc/*.ii ../../../layout/style/nsCSSStyleRule.cpp: In member function 'DOMCSSStyleRuleImpl* DOMCSSDeclarationImpl::DomRule()': ../../../layout/style/nsCSSStyleRule.cpp:1037:53: warning: invalid access to non-static data member 'DOMCSSStyleRuleImpl::mDOMDeclaration' of NULL object [-Winvalid-offsetof] ../../../layout/style/nsCSSStyleRule.cpp:1037:53: warning: (perhaps the 'offsetof' macro was used incorrectly) [-Winvalid-offsetof] In file included from ../../../layout/style/nsCSSRuleProcessor.h:52:0, from ../../../layout/style/nsCSSStyleSheet.cpp:48: ../../../layout/style/nsCSSRules.h: In member function 'nsCSSFontFaceRule* nsCSSFontFaceStyleDecl::ContainingRule()': ../../../layout/style/nsCSSRules.h:292:77: warning: invalid access to non-static data member 'nsCSSFontFaceRule::mDecl' of NULL object [-Winvalid-offsetof] ../../../layout/style/nsCSSRules.h:292:77: warning: (perhaps the 'offsetof' macro was used incorrectly) [-Winvalid-offsetof] ../../../layout/style/nsCSSRules.h: In member function 'const nsCSSFontFaceRule* nsCSSFontFaceStyleDecl::ContainingRule() const': ../../../layout/style/nsCSSRules.h:299:83: warning: invalid access to non-static data member 'nsCSSFontFaceRule::mDecl' of NULL object [-Winvalid-offsetof] ../../../layout/style/nsCSSRules.h:299:83: warning: (perhaps the 'offsetof' macro was used incorrectly) [-Winvalid-offsetof]