Closed Bug 823553 Opened 12 years ago Closed 12 years ago

MSVC 2008 (VC9) builds are failing with "can't take a reference to a reference" after bug 819791

Categories

(Core :: XPCOM, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug)

References

Details

(Keywords: regression)

Attachments

(1 file)

Ginn Chen and Philip Chee reported this failure in bug 819791:

> I'm seeing similar errors with MSVC2008SP1 :
> cc:\t1\hg\comm-central\mozilla\storage\src\Variant.h(318) : warning C4181: qualifier applied to reference type; ignored
> :\t1\hg\comm-central\mozilla\storage\src\Variant.h(318) : warning C4181: qualifier applied to reference type; ignored
>          c:/t1/hg/comm-central/mozilla/storage/src/mozStorageRow.cpp(46) : see reference to class template instantiation 'mozilla::storage::Variant<DataType>' being compiled
>        c:/t1/hg/comm-central/mozilla/storage/src/mozStoragePrivateHelpers.cpp(128) : see reference to class template instantiation 'mozilla::storage::Variant<DataType>' being compiled
>          with
>        with
>          [
>        [
>              DataType=nsString
>            DataType=nsString
>          ]
>        ]
> cc:\t1\hg\comm-central\mozilla\storage\src\Variant.h(318) : warning C4181: qualifier applied to reference type; ignored
> :\t1\hg\comm-central\mozilla\storage\src\Variant.h(318) : warning C4181: qualifier applied to reference type; ignored
> cc:\t1\hg\comm-central\mozilla\storage\src\Variant.h(318) : error C2529: 'aData' : reference to reference is illegal
> :\t1\hg\comm-central\mozilla\storage\src\Variant.h(318) : error C2529: 'aData' : reference to reference is illegal
> cc:/t1/hg/comm-central/mozilla/storage/src/mozStoragePrivateHelpers.cpp(128) : error C2664: 'mozilla::storage::Variant<DataType>::Variant(mozilla::storage::variant_storage_traits<nsString>::ConstructorType (&))' : cannot convert parameter 1 from 'nsDependentJSString' to 'mozilla::storage::variant_storage_traits<nsString>::ConstructorType (&)'
> :/t1/hg/comm-central/mozilla/storage/src/mozStorageRow.cpp(46) : error C2664: 'mozilla::storage::Variant<DataType>::Variant mozilla::storage::variant_storage_traits<nsString>::ConstructorType (&))' :cannot convert parameter 1 from 'nsDependentString' to 'mozilla::storage::variant_storage_traits<nsString>::ConstructorType (&)'
>          with
>        with
>          [
>        [
>              DataType=nsString
>            DataType=nsString
>          ]
>        ]
> 
> etc etc.
Assignee: nobody → justin.lebar+bug
Attachment #694466 - Flags: review?(mak77)
Attachment #694466 - Flags: feedback?(philip.chee)
Attachment #694466 - Flags: feedback?(ginn.chen)
Keywords: regression
Comment on attachment 694466 [details] [diff] [review]
Fix build error in Variant.h on MSVC 2008 and Solaris by not taking double-references.

Review of attachment 694466 [details] [diff] [review]:
-----------------------------------------------------------------

it looks ok, provided the compilers are happy with it, thanks for fixing this.
Attachment #694466 - Flags: review?(mak77) → review+
Thank you for the review!

I'm pretty sure this will fix the build errors, but please let me know if it doesn't.

https://hg.mozilla.org/integration/mozilla-inbound/rev/4e71802dec3a
(In reply to Justin Lebar [:jlebar] (away 12/21-1/2) from comment #3)
> Thank you for the review!
> 
> I'm pretty sure this will fix the build errors, but please let me know if it
> doesn't.
> 
> https://hg.mozilla.org/integration/mozilla-inbound/rev/4e71802dec3a

I can verify this fixes the build issues using MSVC 2008 (also known as VC9).  I can't speak for Solaris.
Summary: MSVC 2008 builds are failing with "can't take a reference to a reference" after bug 819791 → MSVC 2008 (VC9) builds are failing with "can't take a reference to a reference" after bug 819791
Attachment #694466 - Flags: feedback?(ginn.chen) → feedback+
Comment on attachment 694466 [details] [diff] [review]
Fix build error in Variant.h on MSVC 2008 and Solaris by not taking double-references.

Managed to get a successful build with this patch
Thanks Muchly!
f=me
Attachment #694466 - Flags: feedback?(philip.chee) → feedback+
https://hg.mozilla.org/mozilla-central/rev/4e71802dec3a
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: