From: abv Date: Sun, 8 Nov 2015 17:17:47 +0000 (+0300) Subject: 0025078: Coding rules - eliminate GCC warning -Wclobbered X-Git-Tag: V7_0_0_beta~138 X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=6fab2d4f6492c1460bd922435beee1545c5e5ac5 0025078: Coding rules - eliminate GCC warning -Wclobbered GCC warning -Wclobbered suppressed in Standard_ErrorHandler.hxx when OCC_CONVERT_SIGNALS or NO_CXX_EXCEPTIONS are used --- diff --git a/src/Standard/Standard_ErrorHandler.hxx b/src/Standard/Standard_ErrorHandler.hxx index 7df8240a57..968f8eb99f 100644 --- a/src/Standard/Standard_ErrorHandler.hxx +++ b/src/Standard/Standard_ErrorHandler.hxx @@ -67,6 +67,11 @@ #define catch(Error) else if(_Function.Catches(STANDARD_TYPE(Error))) #define OCC_CATCH_SIGNALS + // Suppress GCC warning "variable ... might be clobbered by 'longjmp' or 'vfork'" + #ifdef __GNUC__ + #pragma GCC diagnostic ignored "-Wclobbered" + #endif + #elif defined(OCC_CONVERT_SIGNALS) // Exceptions are raied as usual, signal cause jumps in the nearest @@ -77,6 +82,11 @@ _aHandler.Error()->Reraise(); \ } + // Suppress GCC warning "variable ... might be clobbered by 'longjmp' or 'vfork'" + #ifdef __GNUC__ + #pragma GCC diagnostic ignored "-Wclobbered" + #endif + #else // Normal Exceptions (for example WNT with MSVC and option /GHa)