Closed Bug 563294 Opened 14 years ago Closed 14 years ago

Failure to build with gcc 4.4 in c++0x mode

Categories

(Core :: IPC, defect)

1.9.2 Branch
All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a5

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(1 file)

This is what I get when building 1.9.2.4 build2 with gcc 4.4 in c++0x mode:

In file included from /usr/include/c++/4.4/memory:83,
                 from ../../dist/system_wrappers/memory:3,
                 from ../../ipc/chromium/src/base/thread_collision_warner.h:8,
                 from ../../ipc/chromium/src/base/ref_counted.h:9,
                 from ../../ipc/chromium/src/base/message_pump.h:8,
                 from ../../ipc/chromium/src/base/message_loop.h:14,
                 from nsXPComInit.cpp:152:
/usr/include/c++/4.4/bits/shared_ptr.h: In member function 'virtual void* std::_Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp>::_M_get_deleter(const std::type_info&)':
/usr/include/c++/4.4/bits/shared_ptr.h:146: error: cannot use typeid with -fno-rtti
/usr/include/c++/4.4/bits/shared_ptr.h: In member function 'virtual void* std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_get_deleter(const std::type_info&)':
/usr/include/c++/4.4/bits/shared_ptr.h:204: error: cannot use typeid with -fno-rtti
/usr/include/c++/4.4/bits/shared_ptr.h: In constructor 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, _Alloc, _Args&& ...)':
/usr/include/c++/4.4/bits/shared_ptr.h:861: error: cannot use typeid with -fno-rtti
/usr/include/c++/4.4/bits/shared_ptr.h: In function '_Del* std::get_deleter(const std::__shared_ptr<_Tp2, _Lp>&)':
/usr/include/c++/4.4/bits/shared_ptr.h:1005: error: cannot use typeid with -fno-rtti

Replacing the #include <memory> with #include <memory.h> in ipc/chromium/src/base/thread_collision_warner.h seems to be enough.

Arguably, gcc should maybe not use typeid it this header...
As you said on irc you were fine with that approach... I'm just wondering how that should be incorporated. For example, would a patch file in ipc/ be good ? or should the pull-chromium.py script modified ?
Assignee: nobody → mh+mozilla
Attachment #443306 - Flags: review?(benjamin)
Attachment #443306 - Flags: review?(benjamin) → review+
Comment on attachment 443306 [details] [diff] [review]
Replace memory with memory.h

We've basically forked the chromium code, we don't sync with upstream.
http://hg.mozilla.org/mozilla-central/rev/318cc56de289
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
Would you want this on 1.9.2, too ?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: