Closed
Bug 787730
Opened 13 years ago
Closed 13 years ago
building tests fails with clang 3.2
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: jbeich, Assigned: jbeich)
References
Details
Attachments
(1 file, 2 obsolete files)
|
3.55 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
No description provided.
dom/plugins/test/testplugin/nptest.cpp:3595:24: error: assigning
to 'char' from incompatible type 'nullptr_t'
*((char*) siteEnd) = NULL;
^ ~~~~
dom/plugins/test/testplugin/nptest.cpp:3597:25: error: assigning
to 'char' from incompatible type 'nullptr_t'
*((char*) flagsEnd) = NULL;
^ ~~~~
dom/plugins/test/testplugin/nptest.cpp:3598:21: error: assigning
to 'char' from incompatible type 'nullptr_t'
*((char*) next) = NULL;
^ ~~~~
Attachment #657611 -
Flags: review?
storage/test/test_AsXXX_helpers.cpp:39:3: error: use of
overloaded operator '<<' is ambiguous (with operand types 'std::ostringstream'
(aka 'basic_ostringstream<char>') and 'nullptr_t')
do_check_eq(row->AsSharedUTF8String(0, &len), NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
storage/test/test_AsXXX_helpers.cpp:42:3: error: use of
overloaded operator '<<' is ambiguous (with operand types 'std::ostringstream'
(aka 'basic_ostringstream<char>') and 'nullptr_t')
do_check_eq(row->AsSharedWString(0, &len), NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
storage/test/test_AsXXX_helpers.cpp:45:3: error: use of
overloaded operator '<<' is ambiguous (with operand types 'std::ostringstream'
(aka 'basic_ostringstream<char>') and 'nullptr_t')
do_check_eq(row->AsSharedBlob(0, &len), NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
storage/test/test_AsXXX_helpers.cpp:72:3: error: use of
overloaded operator '<<' is ambiguous (with operand types 'std::ostringstream'
(aka 'basic_ostringstream<char>') and 'nullptr_t')
do_check_eq(stmt->AsSharedUTF8String(0, &len), NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
storage/test/test_AsXXX_helpers.cpp:75:3: error: use of
overloaded operator '<<' is ambiguous (with operand types 'std::ostringstream'
(aka 'basic_ostringstream<char>') and 'nullptr_t')
do_check_eq(stmt->AsSharedWString(0, &len), NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
storage/test/test_AsXXX_helpers.cpp:78:3: error: use of
overloaded operator '<<' is ambiguous (with operand types 'std::ostringstream'
(aka 'basic_ostringstream<char>') and 'nullptr_t')
do_check_eq(stmt->AsSharedBlob(0, &len), NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
storage/test/test_AsXXX_helpers.cpp:86:3: error: use of
overloaded operator '<<' is ambiguous (with operand types 'std::ostringstream'
(aka 'basic_ostringstream<char>') and 'nullptr_t')
do_check_eq(valueArray->AsSharedUTF8String(0, &len), NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
storage/test/test_AsXXX_helpers.cpp:89:3: error: use of
overloaded operator '<<' is ambiguous (with operand types 'std::ostringstream'
(aka 'basic_ostringstream<char>') and 'nullptr_t')
do_check_eq(valueArray->AsSharedWString(0, &len), NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
storage/test/test_AsXXX_helpers.cpp:92:3: error: use of
overloaded operator '<<' is ambiguous (with operand types 'std::ostringstream'
(aka 'basic_ostringstream<char>') and 'nullptr_t')
do_check_eq(valueArray->AsSharedBlob(0, &len), NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Attachment #657612 -
Flags: review?(ehsan)
Attachment #657611 -
Flags: review? → review?(ehsan)
Blocks: clang-macosx
Depends on: 784776
Actually, both cases want 'char'.
Attachment #657611 -
Attachment is obsolete: true
Attachment #657612 -
Attachment is obsolete: true
Attachment #657611 -
Flags: review?(ehsan)
Attachment #657612 -
Flags: review?(ehsan)
Attachment #657637 -
Flags: review?(ehsan)
Updated•13 years ago
|
Attachment #657637 -
Flags: review?(ehsan) → review+
Keywords: checkin-needed
Comment 4•13 years ago
|
||
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 6•12 years ago
|
||
This bug's patch was incorrect, for test_AsXXX_helpers.cpp.
The lines there were originally comparing two pointers, and apparently a compiler complained that the null pointer had an ambiguous pointer-type.
The correct fix for that would be to cast it to the correct pointer-type. The fix that landed here, though, was to swap it out for a non-pointer type, which apparently breaks some compilers because now we're comparing a pointer to a non-pointer.
Comment 7•12 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #6)
> The fix that landed here, though, was to swap it out for a non-pointer type,
> which apparently breaks some compilers because now we're comparing a pointer
> to a non-pointer.
In particular, it broke Jesse's clang build, with errors like:
{
test_AsXXX_helpers.cpp:42:3: error: comparison between pointer and integer
('const PRUnichar *' (aka 'const unsigned short *') and 'int')
do_check_eq(row->AsSharedWString(0, &len), '\0');
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~
}
(Aside: it's also really weird to be comparing a string pointer to '\0'. The former is a pointer-to-characters; the latter is a character, so it looks like we're trying to do string comparison by pointer-equality or something.)
Comment 8•12 years ago
|
||
(In reply to comment #7)
> (In reply to Daniel Holbert [:dholbert] from comment #6)
> > The fix that landed here, though, was to swap it out for a non-pointer type,
> > which apparently breaks some compilers because now we're comparing a pointer
> > to a non-pointer.
>
> In particular, it broke Jesse's clang build, with errors like:
> {
> test_AsXXX_helpers.cpp:42:3: error: comparison between pointer and integer
> ('const PRUnichar *' (aka 'const unsigned short *') and 'int')
> do_check_eq(row->AsSharedWString(0, &len), '\0');
> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~
> }
It didn't build just Jesse's build, it broke everybody's who is using a recent clang (me included.)
Comment 9•12 years ago
|
||
I filed bug 884022 on this bustage.
Updated•12 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•