mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0032402: Coding Rules - eliminate msvc warning C4668 (symbol is not defined as a preprocessor macro, replacing with '0' for directive)
Make preprocessor expressions consistent with respect to guard expressions. Fixed usage of macros __QNX__, IRIX, OCCT_DEBUG, DO_INVERSE, DRAW, CHFI3D_DEB by value. Removed obsolete hack for Sun Workshop 5.0 compiler.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
typedef
|
||||
#ifdef SOLARIS
|
||||
sigjmp_buf
|
||||
#elif IRIX
|
||||
#elif defined(IRIX)
|
||||
sigjmp_buf
|
||||
#else
|
||||
jmp_buf
|
||||
|
@@ -158,7 +158,7 @@
|
||||
#if defined(__ICL) || defined (__INTEL_COMPILER)
|
||||
#define Standard_DISABLE_DEPRECATION_WARNINGS __pragma(warning(push)) __pragma(warning(disable:1478))
|
||||
#define Standard_ENABLE_DEPRECATION_WARNINGS __pragma(warning(pop))
|
||||
#elif (defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__)
|
||||
#elif (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) || defined(__clang__)
|
||||
// available since at least gcc 4.2 (maybe earlier), however only gcc 4.6+ supports this pragma inside the function body
|
||||
// CLang also supports this gcc syntax (in addition to "clang diagnostic ignored")
|
||||
#define Standard_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
|
||||
|
@@ -25,7 +25,7 @@
|
||||
class Standard_OutOfRange;
|
||||
DEFINE_STANDARD_HANDLE(Standard_OutOfRange, Standard_RangeError)
|
||||
|
||||
#if (defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
||||
#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
|
||||
// suppress false-positive warnings produced by GCC optimizer
|
||||
#define Standard_OutOfRange_Always_Raise_if(CONDITION, MESSAGE) \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
|
@@ -26,7 +26,7 @@ class Standard_RangeError;
|
||||
DEFINE_STANDARD_HANDLE(Standard_RangeError, Standard_DomainError)
|
||||
|
||||
#if !defined No_Exception && !defined No_Standard_RangeError
|
||||
#if (defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
||||
#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
|
||||
// suppress false-positive warnings produced by GCC optimizer
|
||||
#define Standard_RangeError_Raise_if(CONDITION, MESSAGE) \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
|
@@ -258,7 +258,7 @@ Standard_Real ATanh(const Standard_Real Value)
|
||||
#endif
|
||||
throw Standard_NumericError("Illegal argument in ATanh");
|
||||
}
|
||||
#if __QNX__
|
||||
#if defined(__QNX__)
|
||||
return std::atanh(Value);
|
||||
#else
|
||||
return atanh(Value);
|
||||
@@ -276,7 +276,7 @@ Standard_Real ACosh (const Standard_Real Value)
|
||||
#endif
|
||||
throw Standard_NumericError("Illegal argument in ACosh");
|
||||
}
|
||||
#if __QNX__
|
||||
#if defined(__QNX__)
|
||||
return std::acosh(Value);
|
||||
#else
|
||||
return acosh(Value);
|
||||
|
@@ -294,7 +294,7 @@ inline Standard_Real Sin (const Standard_Real Value)
|
||||
// ASinh : Returns the hyperbolic arc sine of a real
|
||||
//-------------------------------------------------------------------
|
||||
inline Standard_Real ASinh(const Standard_Real Value)
|
||||
#if __QNX__
|
||||
#if defined(__QNX__)
|
||||
{ return std::asinh(Value); }
|
||||
#else
|
||||
{ return asinh(Value); }
|
||||
|
Reference in New Issue
Block a user