Browse Source

g++7 fixes (#148)

Signed-off-by: Li, Xun<xun.li@intel.com>
Kai Mast 6 years ago
parent
commit
94c162c98b

+ 10 - 10
common/inc/stdc++/new

@@ -48,22 +48,22 @@ namespace std
 	 * The function to call when allocation fails.  By default, there is no
 	 * handler and a bad allocation exception is thrown if an allocation fails.
 	 */
-	new_handler set_new_handler(new_handler handler) throw();
+	new_handler set_new_handler(new_handler handler);
 };
 
 void* SGXAPI operator new (size_t);
 void* SGXAPI operator new[] (size_t);
 
-void* SGXAPI operator new (size_t, const std::nothrow_t&) throw();
-void* SGXAPI operator new (size_t, void*) throw();
-void* SGXAPI operator new[] (size_t, const std::nothrow_t&) throw();
-void* SGXAPI operator new[] (size_t, void*) throw();
+void* SGXAPI operator new (size_t, const std::nothrow_t&);
+void* SGXAPI operator new (size_t, void*);
+void* SGXAPI operator new[] (size_t, const std::nothrow_t&);
+void* SGXAPI operator new[] (size_t, void*);
 
 void SGXAPI operator delete (void*) throw ();
-void SGXAPI operator delete (void*, const std::nothrow_t&) throw();
-void SGXAPI operator delete (void*, void*) throw();
-void SGXAPI operator delete[] (void*) throw ();
-void SGXAPI operator delete[] (void*, const std::nothrow_t&) throw();
-void SGXAPI operator delete[] (void*, void*) throw();
+void SGXAPI operator delete (void*, const std::nothrow_t&);
+void SGXAPI operator delete (void*, void*);
+void SGXAPI operator delete[] (void*);
+void SGXAPI operator delete[] (void*, const std::nothrow_t&);
+void SGXAPI operator delete[] (void*, void*);
 
 #endif /* _NEW_ */

+ 1 - 1
sdk/cpprt/memory_manage/delete2.cpp

@@ -36,7 +36,7 @@
 #include "sgx_trts.h"
 #include "internal/util.h"
 
-SGX_WEAK void SGXAPI operator delete (void* ptr, const std::nothrow_t& nothrow_constant) throw()
+SGX_WEAK void SGXAPI operator delete (void* ptr, const std::nothrow_t& nothrow_constant)
 {
     UNUSED(nothrow_constant);
 

+ 1 - 1
sdk/cpprt/memory_manage/delete3.cpp

@@ -36,7 +36,7 @@
 #include "sgx_trts.h"
 #include "internal/util.h"
 
-SGX_WEAK void SGXAPI operator delete (void* ptr, void* voidptr2) throw()
+SGX_WEAK void SGXAPI operator delete (void* ptr, void* voidptr2)
 {
     UNUSED(ptr);
     UNUSED(voidptr2);

+ 1 - 1
sdk/cpprt/memory_manage/delete4.cpp

@@ -37,7 +37,7 @@
 #include "internal/se_cdefs.h"
 
 //Deallocate storage space of array
-SGX_WEAK void SGXAPI operator delete[] (void* ptr) throw ()
+SGX_WEAK void SGXAPI operator delete[] (void* ptr) 
 {
 	operator delete(ptr);
 }

+ 1 - 1
sdk/cpprt/memory_manage/delete5.cpp

@@ -36,7 +36,7 @@
 #include "sgx_trts.h"
 #include "internal/se_cdefs.h"
 
-SGX_WEAK void SGXAPI operator delete[] (void* ptr, const std::nothrow_t& nothrow_constant) throw()
+SGX_WEAK void SGXAPI operator delete[] (void* ptr, const std::nothrow_t& nothrow_constant)
 {
 	operator delete(ptr, nothrow_constant);
 }

+ 1 - 1
sdk/cpprt/memory_manage/delete6.cpp

@@ -36,7 +36,7 @@
 #include "sgx_trts.h"
 #include "internal/util.h"
 
-SGX_WEAK void SGXAPI operator delete[] (void* ptr, void* voidptr2) throw()
+SGX_WEAK void SGXAPI operator delete[] (void* ptr, void* voidptr2)
 {
     UNUSED(ptr);
     UNUSED(voidptr2);

+ 1 - 1
sdk/cpprt/memory_manage/new2.cpp

@@ -37,7 +37,7 @@
 
 //nothrow version.
 //on failure it returns a null pointer instead of throwing an exception.
-SGX_WEAK void* SGXAPI operator new (size_t dwBytes, const std::nothrow_t& nothrow_constant) throw()
+SGX_WEAK void* SGXAPI operator new (size_t dwBytes, const std::nothrow_t& nothrow_constant) 
 {
 	UNUSED(nothrow_constant);
 

+ 1 - 1
sdk/cpprt/memory_manage/new3.cpp

@@ -37,7 +37,7 @@
 //placement version
 //that does not allocate memory - it simply returns ptr.
 //Notice though that the constructor for the object (if any) will still be called by the operator expression.
-SGX_WEAK void* SGXAPI operator new (size_t dwBytes, void* ptr) throw()
+SGX_WEAK void* SGXAPI operator new (size_t dwBytes, void* ptr)
 {
 	if( !sgx_is_within_enclave(ptr, dwBytes) ){
 		//compiler will check the pointer before call object construct, so it is OK to return NULL here

+ 1 - 1
sdk/cpprt/memory_manage/new5.cpp

@@ -36,7 +36,7 @@
 #include "sgx_trts.h"
 #include "internal/se_cdefs.h"
 
-SGX_WEAK void* SGXAPI operator new[] (size_t dwBytes, const std::nothrow_t& nothrow_constant) throw()
+SGX_WEAK void* SGXAPI operator new[] (size_t dwBytes, const std::nothrow_t& nothrow_constant)
 {
 	return operator new(dwBytes, nothrow_constant);
 }

+ 1 - 1
sdk/cpprt/memory_manage/new6.cpp

@@ -36,7 +36,7 @@
 #include "sgx_trts.h"
 #include "internal/util.h"
 
-SGX_WEAK void* SGXAPI operator new[] (size_t dwBytes, void* ptr) throw()
+SGX_WEAK void* SGXAPI operator new[] (size_t dwBytes, void* ptr)
 {
 	if( !sgx_is_within_enclave(ptr, dwBytes) ){
 		//compiler will check the pointer before call object construct, so it is OK to return NULL here

+ 1 - 1
sdk/cpprt/memory_manage/new_handler.cpp

@@ -53,7 +53,7 @@ namespace std{
     // Return Value
     //      new_handler - The value of the current new_handler function if this has been previously set by this function
     //									 NULL -if this is the first call to set_new_handler
-    new_handler set_new_handler(new_handler handle) throw()
+    new_handler set_new_handler(new_handler handle)
     {
         sgx_spin_lock(&handler_lock);
         new_handler retHandle = new_handl;