This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

dynamic_cast of a reference and -fno-exceptions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]