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:
zaphod
2021-05-30 12:27:19 +02:00
committed by bugmaster
parent d5477f8c82
commit ff1f0c9ae2
29 changed files with 102 additions and 111 deletions
+2 -2
View File
@@ -211,7 +211,7 @@ public:
myDeletable (Standard_False)
{
Standard_RangeError_Raise_if (theUpper < theLower, "NCollection_Array1::Create");
#if (defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
// gcc emits -Warray-bounds warning when NCollection_Array1 is initialized
// from local array with lower index 1 (so that (&theBegin - 1) points out of array bounds).
// NCollection_Array1 initializes myData with a shift to avoid this shift within per-element access.
@@ -220,7 +220,7 @@ public:
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
myData = (TheItemType *) &theBegin - theLower;
#if (defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
#pragma GCC diagnostic pop
#endif
}