Blame SOURCES/build-coreclr-clang10.patch

0e8c89
commit e73f34074a381891ee92711e496134dce758a969
0e8c89
Author: Omair Majid <omajid@redhat.com>
0e8c89
Date:   Tue Jun 2 12:16:31 2020 -0400
0e8c89
0e8c89
    Fix build with clang 10
0e8c89
    
0e8c89
    This contains a grab bag of fixes to fix the build with clang 10.
0e8c89
    
0e8c89
    - https://github.com/dotnet/coreclr/pull/23075
0e8c89
    
0e8c89
      Fix missing includes in coreclr/src/debug/createdump/
0e8c89
    
0e8c89
    - https://github.com/dotnet/runtime/pull/33096
0e8c89
    
0e8c89
      SList::Init: add missing constructor
0e8c89
    
0e8c89
    - A subset of https://github.com/dotnet/coreclr/pull/22129
0e8c89
    
0e8c89
      Just the parts that introduce the THROW_DECL macro in pal.h
0e8c89
    
0e8c89
    - https://github.com/dotnet/runtime/pull/32837
0e8c89
    
0e8c89
      This fixes THROW_DECL introduce in the previous PR to work with clang, which
0e8c89
      is required in clang 10.
0e8c89
    
0e8c89
    - One new change:
0e8c89
    
0e8c89
      In a significant divergance, this commits adds more THROW_DECL macros
0e8c89
      to all the math functions to address a ton of errors pointed out when
0e8c89
      building SOS:
0e8c89
    
0e8c89
        In file included from /home/omajid/devel/dotnet/coreclr/src/ToolBox/SOS/Strike/strike.cpp:116:
0e8c89
        In file included from /home/omajid/devel/dotnet/coreclr/src/vm/hillclimbing.h:19:
0e8c89
        In file included from /home/omajid/devel/dotnet/coreclr/src/inc/complex.h:16:
0e8c89
        In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/math.h:36:
0e8c89
        In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/cmath:45:
0e8c89
        In file included from /usr/include/math.h:290:
0e8c89
        /usr/include/bits/mathcalls.h:53:13: error: exception specification in declaration does not match previous declaration
0e8c89
        __MATHCALL (acos,, (_Mdouble_ __x));
0e8c89
                    ^
0e8c89
        /home/omajid/devel/dotnet/coreclr/src/pal/inc/pal.h:4395:26: note: previous declaration is here
0e8c89
        PALIMPORT double __cdecl acos(double);
0e8c89
                                 ^
0e8c89
    
0e8c89
      Then, to make sure the declarations and implementations match, it adds
0e8c89
      THROW_DECL to the definitions in src/pal/src/cruntime/math.cpp
0e8c89
    
0e8c89
    Co-authored-by: Mike McLaughlin <mikem@microsoft.com>
0e8c89
    Co-authored-by: Sinan Kaya <sinan.kaya@microsoft.com>
0e8c89
    Co-authored-by: Tom Deseyn <tom.deseyn@gmail.com>
0e8c89
0e8c89
diff --git a/src/debug/createdump/createdump.h b/src/debug/createdump/createdump.h
0e8c89
index 4892e5464b..3f71b627e6 100644
0e8c89
--- a/src/debug/createdump/createdump.h
0e8c89
+++ b/src/debug/createdump/createdump.h
0e8c89
@@ -54,6 +54,8 @@ typedef int T_CONTEXT;
0e8c89
 #include <map>
0e8c89
 #include <set>
0e8c89
 #include <vector>
0e8c89
+#include <string>
0e8c89
+#include <array>
0e8c89
 #include "datatarget.h"
0e8c89
 #include "threadinfo.h"
0e8c89
 #include "memoryregion.h"
0e8c89
diff --git a/src/inc/slist.h b/src/inc/slist.h
0e8c89
index 2b81f9ba90..8ea6f9098e 100644
0e8c89
--- a/src/inc/slist.h
0e8c89
+++ b/src/inc/slist.h
0e8c89
@@ -160,13 +160,13 @@ public:
0e8c89
     void Init()
0e8c89
     {
0e8c89
         LIMITED_METHOD_CONTRACT;
0e8c89
-        m_pHead = &m_link;
0e8c89
+        m_pHead = PTR_SLink(&m_link);
0e8c89
         // NOTE :: fHead variable is template argument 
0e8c89
         // the following code is a compiled in, only if the fHead flag
0e8c89
         // is set to false,
0e8c89
         if (!fHead)
0e8c89
         {
0e8c89
-            m_pTail = &m_link;
0e8c89
+            m_pTail = PTR_SLink(&m_link);
0e8c89
         }
0e8c89
     }
0e8c89
 
0e8c89
@@ -274,7 +274,7 @@ public:
0e8c89
         SLink   *ret = SLink::FindAndRemove(m_pHead, GetLink(pObj), &prior);
0e8c89
         
0e8c89
         if (ret == m_pTail)
0e8c89
-            m_pTail = prior;
0e8c89
+            m_pTail = PTR_SLink(prior);
0e8c89
         
0e8c89
         return GetObject(ret);
0e8c89
     }
0e8c89
diff --git a/src/pal/inc/mbusafecrt.h b/src/pal/inc/mbusafecrt.h
0e8c89
index f030b7ded2..7021439af2 100644
0e8c89
--- a/src/pal/inc/mbusafecrt.h
0e8c89
+++ b/src/pal/inc/mbusafecrt.h
0e8c89
@@ -31,6 +31,12 @@ typedef int errno_t;
0e8c89
 // define the return value for success 
0e8c89
 #define SAFECRT_SUCCESS 0
0e8c89
 
0e8c89
+#if defined(_MSC_VER)
0e8c89
+#define THROW_DECL
0e8c89
+#else
0e8c89
+#define THROW_DECL throw()
0e8c89
+#endif
0e8c89
+
0e8c89
 #ifdef __cplusplus
0e8c89
     extern "C" {
0e8c89
 #endif
0e8c89
@@ -98,7 +104,7 @@ extern int swscanf_s( const WCHAR *string, const WCHAR *format, ... );
0e8c89
 extern int _snscanf_s( const char *string, size_t count, const char *format, ... );
0e8c89
 extern int _snwscanf_s( const WCHAR *string, size_t count, const WCHAR *format, ... );
0e8c89
 
0e8c89
-extern errno_t memcpy_s( void * dst, size_t sizeInBytes, const void * src, size_t count );
0e8c89
+extern errno_t memcpy_s( void * dst, size_t sizeInBytes, const void * src, size_t count ) THROW_DECL;
0e8c89
 extern errno_t memmove_s( void * dst, size_t sizeInBytes, const void * src, size_t count );
0e8c89
 
0e8c89
 #ifdef __cplusplus
0e8c89
diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
0e8c89
index 5106c01421..de20524faf 100644
0e8c89
--- a/src/pal/inc/pal.h
0e8c89
+++ b/src/pal/inc/pal.h
0e8c89
@@ -137,6 +137,11 @@ extern "C" {
0e8c89
 #define LANG_THAI                        0x1e
0e8c89
 
0e8c89
 /******************* Compiler-specific glue *******************************/
0e8c89
+#if defined(_MSC_VER) || !defined(__cplusplus)
0e8c89
+#define THROW_DECL
0e8c89
+#else
0e8c89
+#define THROW_DECL throw()
0e8c89
+#endif
0e8c89
 
0e8c89
 #ifndef _MSC_VER
0e8c89
 #if defined(CORECLR)
0e8c89
@@ -4207,7 +4212,7 @@ EXTERN_C
0e8c89
 PALIMPORT
0e8c89
 void *PAL_memcpy (void *dest, const void *src, size_t count);
0e8c89
 
0e8c89
-PALIMPORT void * __cdecl memcpy(void *, const void *, size_t);
0e8c89
+PALIMPORT void * __cdecl memcpy(void *, const void *, size_t) THROW_DECL;
0e8c89
 
0e8c89
 #define memcpy PAL_memcpy
0e8c89
 #define IS_PAL_memcpy 1
0e8c89
@@ -4220,7 +4225,7 @@ PALIMPORT int    __cdecl memcmp(const void *, const void *, size_t);
0e8c89
 PALIMPORT void * __cdecl memset(void *, int, size_t);
0e8c89
 PALIMPORT void * __cdecl memmove(void *, const void *, size_t);
0e8c89
 PALIMPORT void * __cdecl memchr(const void *, int, size_t);
0e8c89
-PALIMPORT long long int __cdecl atoll(const char *);
0e8c89
+PALIMPORT long long int __cdecl atoll(const char *) THROW_DECL;
0e8c89
 PALIMPORT size_t __cdecl strlen(const char *);
0e8c89
 PALIMPORT int __cdecl strcmp(const char*, const char *);
0e8c89
 PALIMPORT int __cdecl strncmp(const char*, const char *, size_t);
0e8c89
@@ -4259,7 +4264,7 @@ PALIMPORT int __cdecl toupper(int);
0e8c89
 #define _TRUNCATE ((size_t)-1)
0e8c89
 #endif
0e8c89
 
0e8c89
-PALIMPORT errno_t __cdecl memcpy_s(void *, size_t, const void *, size_t);
0e8c89
+PALIMPORT errno_t __cdecl memcpy_s(void *, size_t, const void *, size_t) THROW_DECL;
0e8c89
 PALIMPORT errno_t __cdecl memmove_s(void *, size_t, const void *, size_t);
0e8c89
 PALIMPORT char * __cdecl _strlwr(char *);
0e8c89
 PALIMPORT int __cdecl _stricmp(const char *, const char *);
0e8c89
@@ -4387,58 +4392,58 @@ PALIMPORT long long __cdecl llabs(long long);
0e8c89
 PALIMPORT int __cdecl _finite(double);
0e8c89
 PALIMPORT int __cdecl _isnan(double);
0e8c89
 PALIMPORT double __cdecl _copysign(double, double);
0e8c89
-PALIMPORT double __cdecl acos(double);
0e8c89
-PALIMPORT double __cdecl acosh(double);
0e8c89
-PALIMPORT double __cdecl asin(double);
0e8c89
-PALIMPORT double __cdecl asinh(double);
0e8c89
-PALIMPORT double __cdecl atan(double);
0e8c89
-PALIMPORT double __cdecl atanh(double);
0e8c89
-PALIMPORT double __cdecl atan2(double, double);
0e8c89
-PALIMPORT double __cdecl cbrt(double);
0e8c89
-PALIMPORT double __cdecl ceil(double);
0e8c89
-PALIMPORT double __cdecl cos(double);
0e8c89
-PALIMPORT double __cdecl cosh(double);
0e8c89
-PALIMPORT double __cdecl exp(double);
0e8c89
-PALIMPORT double __cdecl fabs(double);
0e8c89
-PALIMPORT double __cdecl floor(double);
0e8c89
-PALIMPORT double __cdecl fmod(double, double); 
0e8c89
-PALIMPORT double __cdecl log(double);
0e8c89
-PALIMPORT double __cdecl log10(double);
0e8c89
-PALIMPORT double __cdecl modf(double, double*);
0e8c89
-PALIMPORT double __cdecl pow(double, double);
0e8c89
-PALIMPORT double __cdecl sin(double);
0e8c89
-PALIMPORT double __cdecl sinh(double);
0e8c89
-PALIMPORT double __cdecl sqrt(double);
0e8c89
-PALIMPORT double __cdecl tan(double);
0e8c89
-PALIMPORT double __cdecl tanh(double);
0e8c89
+PALIMPORT double __cdecl acos(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl acosh(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl asin(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl asinh(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl atan(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl atanh(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl atan2(double, double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl cbrt(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl ceil(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl cos(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl cosh(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl exp(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl fabs(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl floor(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl fmod(double, double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl log(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl log10(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl modf(double, double*) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl pow(double, double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl sin(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl sinh(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl sqrt(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl tan(double) THROW_DECL;
0e8c89
+PALIMPORT double __cdecl tanh(double) THROW_DECL;
0e8c89
 
0e8c89
 PALIMPORT int __cdecl _finitef(float);
0e8c89
 PALIMPORT int __cdecl _isnanf(float);
0e8c89
 PALIMPORT float __cdecl _copysignf(float, float);
0e8c89
-PALIMPORT float __cdecl acosf(float);
0e8c89
-PALIMPORT float __cdecl acoshf(float);
0e8c89
-PALIMPORT float __cdecl asinf(float);
0e8c89
-PALIMPORT float __cdecl asinhf(float);
0e8c89
-PALIMPORT float __cdecl atanf(float);
0e8c89
-PALIMPORT float __cdecl atanhf(float);
0e8c89
-PALIMPORT float __cdecl atan2f(float, float);
0e8c89
-PALIMPORT float __cdecl cbrtf(float);
0e8c89
-PALIMPORT float __cdecl ceilf(float);
0e8c89
-PALIMPORT float __cdecl cosf(float);
0e8c89
-PALIMPORT float __cdecl coshf(float);
0e8c89
-PALIMPORT float __cdecl expf(float);
0e8c89
-PALIMPORT float __cdecl fabsf(float);
0e8c89
-PALIMPORT float __cdecl floorf(float);
0e8c89
-PALIMPORT float __cdecl fmodf(float, float); 
0e8c89
-PALIMPORT float __cdecl logf(float);
0e8c89
-PALIMPORT float __cdecl log10f(float);
0e8c89
-PALIMPORT float __cdecl modff(float, float*);
0e8c89
-PALIMPORT float __cdecl powf(float, float);
0e8c89
-PALIMPORT float __cdecl sinf(float);
0e8c89
-PALIMPORT float __cdecl sinhf(float);
0e8c89
-PALIMPORT float __cdecl sqrtf(float);
0e8c89
-PALIMPORT float __cdecl tanf(float);
0e8c89
-PALIMPORT float __cdecl tanhf(float);
0e8c89
+PALIMPORT float __cdecl acosf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl acoshf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl asinf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl asinhf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl atanf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl atanhf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl atan2f(float, float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl cbrtf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl ceilf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl cosf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl coshf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl expf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl fabsf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl floorf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl fmodf(float, float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl logf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl log10f(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl modff(float, float*) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl powf(float, float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl sinf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl sinhf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl sqrtf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl tanf(float) THROW_DECL;
0e8c89
+PALIMPORT float __cdecl tanhf(float) THROW_DECL;
0e8c89
 
0e8c89
 #ifndef PAL_STDCPP_COMPAT
0e8c89
 
0e8c89
diff --git a/src/pal/src/cruntime/math.cpp b/src/pal/src/cruntime/math.cpp
0e8c89
index a36ac9aa93..81345ea14b 100644
0e8c89
--- a/src/pal/src/cruntime/math.cpp
0e8c89
+++ b/src/pal/src/cruntime/math.cpp
0e8c89
@@ -117,7 +117,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT double __cdecl PAL_acos(double x)
0e8c89
+PALIMPORT double __cdecl PAL_acos(double x) THROW_DECL
0e8c89
 {
0e8c89
     double ret;
0e8c89
     PERF_ENTRY(acos);
0e8c89
@@ -147,7 +147,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT double __cdecl PAL_acosh(double x)
0e8c89
+PALIMPORT double __cdecl PAL_acosh(double x) THROW_DECL
0e8c89
 {
0e8c89
     double ret;
0e8c89
     PERF_ENTRY(acosh);
0e8c89
@@ -166,7 +166,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT double __cdecl PAL_asin(double x)
0e8c89
+PALIMPORT double __cdecl PAL_asin(double x) THROW_DECL
0e8c89
 {
0e8c89
     double ret;
0e8c89
     PERF_ENTRY(asin);
0e8c89
@@ -196,7 +196,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT double __cdecl PAL_asinh(double x)
0e8c89
+PALIMPORT double __cdecl PAL_asinh(double x) THROW_DECL
0e8c89
 {
0e8c89
     double ret;
0e8c89
     PERF_ENTRY(asinh);
0e8c89
@@ -215,7 +215,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT double __cdecl PAL_atan2(double y, double x)
0e8c89
+PALIMPORT double __cdecl PAL_atan2(double y, double x) THROW_DECL
0e8c89
 {
0e8c89
     double ret;
0e8c89
     PERF_ENTRY(atan2);
0e8c89
@@ -255,7 +255,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT double __cdecl PAL_exp(double x)
0e8c89
+PALIMPORT double __cdecl PAL_exp(double x) THROW_DECL
0e8c89
 {
0e8c89
     double ret;
0e8c89
     PERF_ENTRY(exp);
0e8c89
@@ -306,7 +306,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT double __cdecl PAL_log(double x)
0e8c89
+PALIMPORT double __cdecl PAL_log(double x) THROW_DECL
0e8c89
 {
0e8c89
     double ret;
0e8c89
     PERF_ENTRY(log);
0e8c89
@@ -336,7 +336,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT double __cdecl PAL_log10(double x)
0e8c89
+PALIMPORT double __cdecl PAL_log10(double x) THROW_DECL
0e8c89
 {
0e8c89
     double ret;
0e8c89
     PERF_ENTRY(log10);
0e8c89
@@ -366,7 +366,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT double __cdecl PAL_pow(double x, double y)
0e8c89
+PALIMPORT double __cdecl PAL_pow(double x, double y) THROW_DECL
0e8c89
 {
0e8c89
     double ret;
0e8c89
     PERF_ENTRY(pow);
0e8c89
@@ -527,7 +527,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT float __cdecl PAL_acosf(float x)
0e8c89
+PALIMPORT float __cdecl PAL_acosf(float x) THROW_DECL
0e8c89
 {
0e8c89
     float ret;
0e8c89
     PERF_ENTRY(acosf);
0e8c89
@@ -557,7 +557,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT float __cdecl PAL_acoshf(float x)
0e8c89
+PALIMPORT float __cdecl PAL_acoshf(float x) THROW_DECL
0e8c89
 {
0e8c89
     float ret;
0e8c89
     PERF_ENTRY(acoshf);
0e8c89
@@ -576,7 +576,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT float __cdecl PAL_asinf(float x)
0e8c89
+PALIMPORT float __cdecl PAL_asinf(float x) THROW_DECL
0e8c89
 {
0e8c89
     float ret;
0e8c89
     PERF_ENTRY(asinf);
0e8c89
@@ -606,7 +606,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT float __cdecl PAL_asinhf(float x)
0e8c89
+PALIMPORT float __cdecl PAL_asinhf(float x) THROW_DECL
0e8c89
 {
0e8c89
     float ret;
0e8c89
     PERF_ENTRY(asinhf);
0e8c89
@@ -626,7 +626,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT float __cdecl PAL_atan2f(float y, float x)
0e8c89
+PALIMPORT float __cdecl PAL_atan2f(float y, float x) THROW_DECL
0e8c89
 {
0e8c89
     float ret;
0e8c89
     PERF_ENTRY(atan2f);
0e8c89
@@ -666,7 +666,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT float __cdecl PAL_expf(float x)
0e8c89
+PALIMPORT float __cdecl PAL_expf(float x) THROW_DECL
0e8c89
 {
0e8c89
     float ret;
0e8c89
     PERF_ENTRY(expf);
0e8c89
@@ -698,7 +698,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT float __cdecl PAL_logf(float x)
0e8c89
+PALIMPORT float __cdecl PAL_logf(float x) THROW_DECL
0e8c89
 {
0e8c89
     float ret;
0e8c89
     PERF_ENTRY(logf);
0e8c89
@@ -728,7 +728,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT float __cdecl PAL_log10f(float x)
0e8c89
+PALIMPORT float __cdecl PAL_log10f(float x) THROW_DECL
0e8c89
 {
0e8c89
     float ret;
0e8c89
     PERF_ENTRY(log10f);
0e8c89
@@ -758,7 +758,7 @@ Function:
0e8c89
 
0e8c89
 See MSDN.
0e8c89
 --*/
0e8c89
-PALIMPORT float __cdecl PAL_powf(float x, float y)
0e8c89
+PALIMPORT float __cdecl PAL_powf(float x, float y) THROW_DECL
0e8c89
 {
0e8c89
     float ret;
0e8c89
     PERF_ENTRY(powf);
0e8c89
diff --git a/src/pal/src/safecrt/memcpy_s.cpp b/src/pal/src/safecrt/memcpy_s.cpp
0e8c89
index 27aeb79665..a75ec41861 100644
0e8c89
--- a/src/pal/src/safecrt/memcpy_s.cpp
0e8c89
+++ b/src/pal/src/safecrt/memcpy_s.cpp
0e8c89
@@ -54,7 +54,7 @@ errno_t __cdecl memcpy_s(
0e8c89
     size_t sizeInBytes,
0e8c89
     const void * src,
0e8c89
     size_t count
0e8c89
-)
0e8c89
+) THROW_DECL
0e8c89
 {
0e8c89
     if (count == 0)
0e8c89
     {