This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
dynamic_cast of a reference and -fno-exceptions
- From: Daniel Gutson <daniel dot gutson at tallertechnologies dot com>
- To: gcc Mailing List <gcc at gcc dot gnu dot org>
- Date: Mon, 19 May 2014 16:32:03 -0300
- Subject: dynamic_cast of a reference and -fno-exceptions
- Authentication-results: sourceware.org; auth=none
Hi,
should gcc warn at least if a dynamic_cast of a reference is used when
-fno-exceptions is specified?
At least 4.8.2 doesn't complain.
If so, I can implement the fix.
Example:
struct Base
{
virtual void f(){}
};
struct Der : Base {};
int main()
{
Der d;
Base& b = d;
dynamic_cast<Der&>(b);
}
Daniel.
--
Daniel F. Gutson
Chief Engineering Officer, SPD
San Lorenzo 47, 3rd Floor, Office 5
CÃrdoba, Argentina
Phone: +54 351 4217888 / +54 351 4218211
Skype: dgutson