I don't pretend to understand the actual C++ issue here but the build log snippet
that was posted misses something that might help solve the problem, vis, the two
lines above the snippet which detail the actual error and where the compiler suggests
how to avoid it
/build/buildd/kompozer-0.8~b3.dfsg.1/mozilla/layout/style/nsCSSStyleSheet.cpp: In function 'PRBool AttrMatchesValue(const nsAttrSelector*, const nsString&)':
/build/buildd/kompozer-0.8~b3.dfsg.1/mozilla/layout/style/nsCSSStyleSheet.cpp:2897:43: error: uninitialized const 'ciComparator' [-fpermissive]
../../dist/include/unicharutil/nsUnicharUtils.h:63:7: note: 'const class nsCaseInsensitiveStringComparator' has no user-provided default constructor
For reasons I won't go into here I came to build FireFox2 (yes, 2!) and have seen the same error and
then found this thread whilst looking for an answer.
The lines of relevant code in nsCSSStyleSheet.cpp are these
I don't pretend to understand the actual C++ issue here but the build log snippet
that was posted misses something that might help solve the problem, vis, the two
lines above the snippet which detail the actual error and where the compiler suggests
how to avoid it
/build/ buildd/ kompozer- 0.8~b3. dfsg.1/ mozilla/ layout/ style/nsCSSStyl eSheet. cpp: In function 'PRBool AttrMatchesValu e(const nsAttrSelector*, const nsString&)': buildd/ kompozer- 0.8~b3. dfsg.1/ mozilla/ layout/ style/nsCSSStyl eSheet. cpp:2897: 43: error: uninitialized const 'ciComparator' [-fpermissive] include/ unicharutil/ nsUnicharUtils. h:63:7: note: 'const class nsCaseInsensiti veStringCompara tor' has no user-provided default constructor
/build/
../../dist/
For reasons I won't go into here I came to build FireFox2 (yes, 2!) and have seen the same error and
then found this thread whilst looking for an answer.
The lines of relevant code in nsCSSStyleSheet.cpp are these
... Comparator defaultComparator; veStringCompara tor ciComparator; >mCaseSensitive CAST(const nsStringCompara tor&, defaultComparator) CAST(const nsStringCompara tor&, ciComparator);
const nsDefaultString
const nsCaseInsensiti
const nsStringComparator& comparator = aAttrSelector-
? NS_STATIC_
: NS_STATIC_
...
but note that there's only one place where the variable for which the declaration
is causing the error, ciComparator, is used.
Elsewhere in the firefox codebase, you don't see declarations such as the above
but you do see a "default constructor" referred to, vis:
nsCaseInsensiti veStringCompara tor()
I therefore modified nsCSSStyleSheet.cpp to just use the default constructor in place
and not declare the "intermediate" variable.
const nsDefaultString Comparator defaultComparator; >mCaseSensitive CAST(const nsStringCompara tor&, defaultComparator) CAST(const nsStringCompara tor&, nsCaseInsensiti veStringCompara tor() );
const nsStringComparator& comparator = aAttrSelector-
? NS_STATIC_
: NS_STATIC_
This at least allows nsCSSStyleSheet.cpp to compile.
I also ran the compile of that individual source file using -fpermissive and that "defeats"
the error too.
As I say, it may not be the correct/complete solution, but maybe the info will help point
someone else to it.