This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: Will the dynamic_cast, throw, typeid shared library bug be fixed?
- From: "Rice, Michael A." <MICHAEL dot A dot RICE at saic dot com>
- To: 'Jim Wilson' <wilson at specifixinc dot com>, "Rice, Michael A." <MICHAEL dot A dot RICE at saic dot com>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 30 Oct 2003 12:46:57 -0800
- Subject: RE: Will the dynamic_cast, throw, typeid shared library bug be fixed?
> -----Original Message-----
> From: Jim Wilson [mailto:wilson@specifixinc.com]
> Sent: Thursday, October 30, 2003 1:53 PM
> To: Rice, Michael A.
> Cc: gcc-bugs@gcc.gnu.org
> Subject: Re: Will the dynamic_cast, throw, typeid shared
> library bug be
> fixed?
>
>
> Rice, Michael A. wrote:
> > The FAQ 5.2 item "dynamic_cast, throw, typeid don't work with shared
> > libraries" seems to indicate this is some sort of feature,
> not a bug, and
> > will not be fixed.
>
> The FAQ asks a question and then answers it. So your answer
> is there in
> the FAQ. These do work with shared libraries if you follow the
> recommendations in the FAQ.
>
> > Is this problem going to be fixed?
>
> Gcc behavior is the result of how the C++ language, C++ ABI, and ELF
> object file standards are defined. So there appears to be
> nothing for
> us to fix. We can only warn you about feature clashes, and
> that is what
> this FAQ entry does.
I understand the problems identified in the FAQ. However, for various
reasons, the recommendations in the FAQ are not suitable for our projects.
Specifically, we use dlopen() to load the libraries, but the call to
dlopen() is in a 3rd party library that we can't modify.
To me, it looks like a regression since it doesn't happen in previous GCC
versions and this particular problem doesn't seem to occur with other
vendors' compilers (SGI, Sun, MS, etc.) It just seems odd to have to jump
through so many hoops to use such a fundamental C++ language feature.
Michael