Closed
Bug 623116
Opened 15 years ago
Closed 14 years ago
Add constructor for nsASCIICaseInsensitiveStringComparator (which inherits from nsStringComparator) to placate CLang
Categories
(Core :: Internationalization, defect)
Tracking
()
RESOLVED
FIXED
mozilla5
People
(Reporter: espindola, Assigned: espindola)
References
Details
Attachments
(1 file)
|
542 bytes,
patch
|
smontagu
:
review+
|
Details | Diff | Splinter Review |
nsASCIICaseInsensitiveStringComparator is missing a user defined constructor, but in nsCSSRuleProcessor.cpp a const variable of this type is defined.
This is not valid c++. For more information see "Default initialization of const variable of a class type requires user-defined default constructor" in http://clang.llvm.org/compatibility.html#c++
| Assignee | ||
Updated•15 years ago
|
Attachment #501232 -
Attachment is patch: true
Attachment #501232 -
Attachment mime type: application/octet-stream → text/plain
Attachment #501232 -
Flags: review?(smontagu)
| Assignee | ||
Updated•15 years ago
|
Blocks: clang-macosx
bugzilla doesn't linkify ++, and your link was poor anyway,
http://clang.llvm.org/compatibility.html#default_init_const
is I believe what you intended to reference.
OS: Mac OS X → Windows 7
The reporter's summary and initial comment were both lame. I'm merely adjusting the summary and providing a better link. I am not passing judgement on the quality of the bug report.
http://clang.llvm.org/compatibility.html#default_init_const
Summary: Missing constructor → Add constructor for nsASCIICaseInsensitiveStringComparator (which inherits from nsStringComparator) to placate CLang
Comment 3•15 years ago
|
||
I'm far from a C++ language expert, but does that in fact apply? nsASCIICaseInsensitiveStringComparator is non-POD, since it has a base class.
| Assignee | ||
Comment 4•15 years ago
|
||
Sorry for the lameness, but I had to open 13 silly bugs like this and with such an overhead copy and pasting becomes really tempting.
The paragraph in question says:
If no initializer is specified for an object, and the object is of (possibly cv-qualified) non-POD class type (or array thereof), the object shall be default-initialized; if the object is of const-qualified type, the underlying class type shall have a user-declared default constructor. Otherwise, if no initializer is specified for a non-static object, the object and its subobjects, if any, have an indeterminate initial; if the object or any of its subobjects are of const-qualified type, the program is ill-formed.
So i think it applies because it is non-POD.
| Assignee | ||
Comment 6•14 years ago
|
||
ping
Updated•14 years ago
|
Attachment #501232 -
Flags: review?(smontagu) → review+
| Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Comment 7•14 years ago
|
||
This patch along with the ones in bug #623123 , #623126 , #628371 also fixes compilation with gcc 4.6 , hats off to espindola, thanks!
Updated•14 years ago
|
Assignee: smontagu → respindola
Comment 8•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.2
You need to log in
before you can comment on or make changes to this bug.
Description
•