[Bug c++/15531] dynamic_cast fails (at runtime) when dependant on friendship of invoker
gdr at integrable-solutions dot net
gcc-bugzilla@gcc.gnu.org
Wed May 19 19:05:00 GMT 2004
------- Additional Comments From gdr at integrable-solutions dot net 2004-05-19 01:15 -------
Subject: Re: dynamic_cast fails (at runtime) when dependant on friendship of invoker
"gccbugs at contacts dot eelis dot net" <gcc-bugzilla@gcc.gnu.org> writes:
| I see, thanks for clearing that up.
| In this case, would it not be desirable to have gcc emit an error/warning
| indicating that the cast will always fail since Base is not a public
| base class of Derived?
yes, it could -- not in all cases -- but this is certainly a case when
the answer is known at translation time. The PR could be open as
diagnostic enhancement and the subject changed to reflect the outcome
ot this discussion.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15531
More information about the Gcc-bugs
mailing list