[Bug c++/28687] [4.2 regression] dynamic_cast<void*> disallowed too rigorously with -fno-rtti

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Fri Aug 11 04:48:00 GMT 2006



------- Comment #7 from gdr at integrable-solutions dot net  2006-08-11 04:48 -------
Subject: Re:  [4.2 regression] dynamic_cast<void*> disallowed too rigorously
with -fno-rtti

"benjamin at smedbergs dot us" <gcc-bugzilla@gcc.gnu.org> writes:

| Gabriel, can you explain how it worked correctly in all the previous
| releases? 

I don't understand exactly what you mean by "it worked correctly".
The documentation says:

  Disable generation of information about every class with virtual
  functions for use by the C++ runtime type identification features
  (`dynamic_cast' and `typeid'). If you don't use those parts of the
  language, you can save some space by using this flag. Note that
  exception handling uses the same information, but it will generate
  it as needed. 

In particular, you cannot use dynamic_cast and -fno-rtti at the same
time.  So far, it appears to me that your programs were contrary to
the documented recommendation.  

This PR should be closed as invalid.

| Is my summary of how it is done using only the vtable inaccurate?

As far as I understand the issue, yes.

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28687



More information about the Gcc-bugs mailing list