Browse Source

HPCC-21924 Fix build error on gcc 7.3

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 6 years ago
parent
commit
7705fbe731
5 changed files with 4 additions and 14 deletions
  1. 1 1
      rtl/eclrtl/CMakeLists.txt
  2. 1 2
      rtl/eclrtl/rtldistr.cpp
  3. 0 8
      rtl/nbcd/nbcd.cpp
  4. 0 1
      rtl/nbcd/nbcd.hpp
  5. 2 2
      system/jlib/jiface.hpp

+ 1 - 1
rtl/eclrtl/CMakeLists.txt

@@ -109,7 +109,7 @@ if (USE_ICU)
 endif ()
 
 if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
-  SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-switch -Wno-unused-parameter -Werror -Wno-delete-non-virtual-dtor -Wno-overloaded-virtual")
+  SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-switch -Wno-unused-parameter -Werror -Wno-delete-non-virtual-dtor -Wno-overloaded-virtual -Wno-deprecated-declarations")
 endif()
 
 

+ 1 - 2
rtl/eclrtl/rtldistr.cpp

@@ -408,8 +408,7 @@ ECLRTL_API IStringDistributionTable *createIStringDistributionTable(const char *
     switch (size)
     {
     case 0:
-//  case UNKNOWN_LENGTH:
-        assertex(false); // TBD
+        throwUnexpected();
     case 1:
         return new CCharDistributionTable(name);
     default:

+ 0 - 8
rtl/nbcd/nbcd.cpp

@@ -29,14 +29,6 @@
 static double Pow10[] = { 1, 10, 100, 1000, 10000, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10,1e11,1e12,1e13,1e14,1e15,1e16 };
 static int signMap[16] = { 0,0,0,0,0,0,0,0,0,0,+1,-1,+1,-1,+1,+1 };
 
-
-
-
-Decimal::Decimal(const Decimal & other)
-{
-    memcpy(this, &other, sizeof(*this));
-}
-
 Decimal & Decimal::abs()
 {
     negative = false;

+ 0 - 1
rtl/nbcd/nbcd.hpp

@@ -48,7 +48,6 @@ class nbcd_decl Decimal
 {
 public:
     constexpr Decimal() = default;
-    Decimal(const Decimal & other);
 
     Decimal & abs();
     Decimal & add(const Decimal & other);

+ 2 - 2
system/jlib/jiface.hpp

@@ -27,8 +27,8 @@
 #include "jscm.hpp"
 #include "jatomic.hpp"
 
-void jlib_decl raiseAssertException(const char *assertion, const char *file, unsigned line);
-void jlib_decl raiseAssertCore(const char *assertion, const char *file, unsigned line);
+__declspec(noreturn) void jlib_decl raiseAssertException(const char *assertion, const char *file, unsigned line) __attribute__((noreturn));
+__declspec(noreturn) void jlib_decl raiseAssertCore(const char *assertion, const char *file, unsigned line) __attribute__((noreturn));
 
 #undef assert
 #undef assertex