]> OCCT Git - occt.git/commitdiff
0033404: Configuration - Building with Cotire failed on Clang-15 CR33404
authordpasukhi <dpasukhi@opencascade.com>
Tue, 6 Jun 2023 13:19:14 +0000 (13:19 +0000)
committerdpasukhi <dpasukhi@opencascade.com>
Tue, 6 Jun 2023 13:21:50 +0000 (13:21 +0000)
Replaced old including of int defs from C standard into C++(11+) standard

src/ExpToCasExe/exptocas.lex
src/ExpToCasExe/lex.exptocas.cxx
src/Standard/Standard_TypeDef.hxx
src/StepFile/lex.step.cxx
src/StepFile/step.lex

index ac71e0a8786b2836ab4bf595eeb7f96544bd645e..6683335d03094183a5ffd61257c10003b8b1e2a4 100644 (file)
@@ -86,9 +86,7 @@ int ec_error ( const std::string& s, const std::string& text )
 
 %top{
 // Pre-include stdlib.h to avoid redefinition of integer type macros (INT8_MIN and similar in generated code)
-#if !defined(_MSC_VER) || (_MSC_VER >= 1600) // Visual Studio 2010+
-#include "stdint.h"
-#endif
+#include <Standard_TypeDef.hxx>
 }
 
 %{
index 59c0574de6cb568a2a0e86937d539ecd342ea0ed..a611107d1676e20cbc1175d652451062e2844268 100644 (file)
@@ -1,7 +1,5 @@
 // Pre-include stdlib.h to avoid redefinition of integer type macros (INT8_MIN and similar in generated code)
-#if !defined(_MSC_VER) || (_MSC_VER >= 1600) // Visual Studio 2010+
-#include "stdint.h"
-#endif
+#include <Standard_TypeDef.hxx>
 
 #define  YY_INT_ALIGNED short int
 
index 4b23181ed46362cbfcb976879f797eac18e8d032..a308c64df407c0e625c88737e5380004f164797f 100755 (executable)
 
 #include <cstddef>
 #include <ctime>
-
-#include <stdint.h>
-
-#if(defined(_MSC_VER) && (_MSC_VER < 1800))
-  // only Visual Studio 2013 (vc12) provides <cinttypes> header
-  // we do not defined all macros here - only used by OCCT framework
-  #define PRIx64 "I64x"
-  #define PRIX64 "I64X"
-  #define PRId64 "I64d"
-  #define PRIu64 "I64u"
-  #define SCNd64 "I64d"
-  #define SCNu64 "I64u"
-  #ifdef _WIN64
-    #define PRIxPTR "I64x"
-    #define PRIXPTR "I64X"
-    #define PRIdPTR "I64d"
-    #define PRIuPTR "I64u"
-    #define SCNdPTR "I64d"
-    #define SCNuPTR "I64u"
-  #else
-    #define PRIxPTR "Ix"
-    #define PRIXPTR "IX"
-    #define PRIdPTR "d"
-    #define PRIuPTR "u"
-    #define SCNdPTR "d"
-    #define SCNuPTR "u"
-  #endif
-#else
-  // should be just <cinttypes> since C++11
-  // however we use this code for compatibility with old C99 compilers
-  #ifndef __STDC_FORMAT_MACROS
-    #define __STDC_FORMAT_MACROS
-  #endif
-  #include <inttypes.h>
-#endif
+#include <cstdint>
+#include <cinttypes>
 
 #define Standard_False false
 #define Standard_True  true
index b87ec7705e74649f09307a0af66d9ad2a915a368..fd70f46fcbeaf0687cd70cce6cec82098215a143 100644 (file)
@@ -2,9 +2,7 @@
 // This file is generated, do not modify it directly; edit source file step.lex instead.
 
 // Pre-include stdlib.h to avoid redefinition of integer type macros (INT8_MIN and similar in generated code)
-#if !defined(_MSC_VER) || (_MSC_VER >= 1600) // Visual Studio 2010+
-#include "stdint.h"
-#endif
+#include <Standard_TypeDef.hxx>
 
 #define  YY_INT_ALIGNED short int
 
index a2a401da51ff010d0b6e247f3b863ae1bbc133d0..30d4a7e93795a03d03b43b1e06d4174bbaf89c78 100644 (file)
@@ -33,9 +33,7 @@
 // This file is generated, do not modify it directly; edit source file step.lex instead.
 
 // Pre-include stdlib.h to avoid redefinition of integer type macros (INT8_MIN and similar in generated code)
-#if !defined(_MSC_VER) || (_MSC_VER >= 1600) // Visual Studio 2010+
-#include "stdint.h"
-#endif
+#include <Standard_TypeDef.hxx>
 }
 
 %{