Index: common/platform/unix/SysThread.cpp
===================================================================
--- common/platform/unix/SysThread.cpp	(revision 11560)
+++ common/platform/unix/SysThread.cpp	(working copy)
@@ -63,22 +63,6 @@
     // default dispatch returns immediately
 }
 
-
-char *SysThread::getStackBase()
-{
-   int32_t temp;
-#pragma GCC diagnostic push
-// avoid CLANG warning: address of stack memory associated with local variable returned
-#pragma clang diagnostic ignored "-Wreturn-stack-address"
-// avoid CLANG warning: unknown warning group '-Wreturn-local-addr', ignored
-#pragma clang diagnostic ignored "-Wunknown-pragmas"
-// avoid GCC warning: function returns address of local variable
-#pragma GCC diagnostic ignored "-Wreturn-local-addr"
-   return ((char *)(&temp)) - THREAD_STACK_SIZE;
-#pragma GCC diagnostic pop
-}
-
-
 void SysThread::terminate()
 {
     if (!attached && _threadID != 0)
Index: common/platform/unix/SysThread.hpp
===================================================================
--- common/platform/unix/SysThread.hpp	(revision 11560)
+++ common/platform/unix/SysThread.hpp	(working copy)
@@ -77,7 +77,6 @@
 
     virtual void attachThread();
     virtual void dispatch();
-    char *getStackBase();
     void terminate();
     void startup();
     void shutdown();
Index: common/platform/windows/SysThread.cpp
===================================================================
--- common/platform/windows/SysThread.cpp	(revision 11560)
+++ common/platform/windows/SysThread.cpp	(working copy)
@@ -113,18 +113,6 @@
 
 
 /**
- * Return a pointer to the current stack base.
- *
- * @return A pointer to the current stack position
- */
-char *SysThread::getStackBase()
-{
-   int32_t temp;
-   return ((char *)(&temp)) - THREAD_STACK_SIZE;
-}
-
-
-/**
  * Do any platform specific termination
  */
 void SysThread::terminate()
Index: common/platform/windows/SysThread.hpp
===================================================================
--- common/platform/windows/SysThread.hpp	(revision 11560)
+++ common/platform/windows/SysThread.hpp	(working copy)
@@ -74,7 +74,6 @@
 
     virtual void attachThread();
     virtual void dispatch();
-    char *getStackBase();
     void terminate();
     void startup();
     void shutdown();
Index: interpreter/concurrency/Activity.cpp
===================================================================
--- interpreter/concurrency/Activity.cpp	(revision 11556)
+++ interpreter/concurrency/Activity.cpp	(working copy)
@@ -159,8 +159,10 @@
 {
     // some things only occur on subsequent requests
     bool firstDispatch = true;
+
+    int32_t base;
     // establish the stack base pointer for control stack full detection.
-    stackBase = currentThread.getStackBase(TOTAL_STACK_SIZE);
+    stackBase = currentThread.getStackBase(&base, TOTAL_STACK_SIZE);
 
     for (;;)
     {
@@ -309,6 +311,8 @@
     // active activity, which we can't guarantee at this point.
     GlobalProtectedObject p(this);
 
+    int32_t base;         // used for determining the stack base
+
     // globally clear the object because we could be reusing the
     // object storage
     clearObject();
@@ -355,7 +359,7 @@
         // run on the current thread
         currentThread.useCurrentThread();
         // reset the stack base for this thread.
-        stackBase = currentThread.getStackBase(TOTAL_STACK_SIZE);
+        stackBase = currentThread.getStackBase(&base, TOTAL_STACK_SIZE);
     }
 }
 
@@ -3229,9 +3233,10 @@
 {
     // we unwind to the current activation depth on termination.
     size_t  startDepth;
+    int32_t base;         // used for determining the stack base
 
     // update the stack base
-    stackBase = currentThread.getStackBase(TOTAL_STACK_SIZE);
+    stackBase = currentThread.getStackBase(&base, TOTAL_STACK_SIZE);
     // get a new random seed
     generateRandomNumberSeed();
     startDepth = stackFrameDepth;
Index: interpreter/platform/unix/SysActivity.cpp
===================================================================
--- interpreter/platform/unix/SysActivity.cpp	(revision 11556)
+++ interpreter/platform/unix/SysActivity.cpp	(working copy)
@@ -126,18 +126,12 @@
  * Return the pointer to the base of the current stack.
  * This is used for checking recursion overflows.
  *
+ * @param base      A local variable at the base of the stack.
+ * @param stackSize
+ *
  * @return The character pointer for the stack base.
  */
-char *SysActivity::getStackBase(size_t stackSize)
+char *SysActivity::getStackBase(int32_t *base, size_t stackSize)
 {
-    size_t temp;
-#pragma GCC diagnostic push
-// avoid CLANG warning: address of stack memory associated with local variable returned
-#pragma clang diagnostic ignored "-Wreturn-stack-address"
-// avoid CLANG warning: unknown warning group '-Wreturn-local-addr', ignored
-#pragma clang diagnostic ignored "-Wunknown-pragmas"
-// avoid GCC warning: function returns address of local variable
-#pragma GCC diagnostic ignored "-Wreturn-local-addr"
-    return (char *)&temp - stackSize;
-#pragma GCC diagnostic pop
+    return (char *)base - stackSize;
 }
Index: interpreter/platform/unix/SysActivity.hpp
===================================================================
--- interpreter/platform/unix/SysActivity.hpp	(revision 11556)
+++ interpreter/platform/unix/SysActivity.hpp	(working copy)
@@ -80,7 +80,7 @@
     void create(Activity *activity, size_t stackSize);
     void close();
     void useCurrentThread();
-    char *getStackBase(size_t stackSize);
+    char *getStackBase(int32_t *base, size_t stackSize);
     void setPriority(int p);
     bool validateThread();
     inline thread_id_t getThreadID() { return (thread_id_t)threadId; }
Index: interpreter/platform/windows/SysActivity.cpp
===================================================================
--- interpreter/platform/windows/SysActivity.cpp	(revision 11556)
+++ interpreter/platform/windows/SysActivity.cpp	(working copy)
@@ -125,10 +125,12 @@
  * Return the pointer to the base of the current stack.
  * This is used for checking recursion overflows.
  *
+ * @param base      A local variable at the base of the stack.
+ * @param stackSize
+ *
  * @return The character pointer for the stack base.
  */
-char *SysActivity::getStackBase(size_t stackSize)
+char *SysActivity::getStackBase(int32_t *base, size_t stackSize)
 {
-    size_t temp;
-    return(char *)&temp - stackSize;
+    return (char *)base - stackSize;
 }
Index: interpreter/platform/windows/SysActivity.hpp
===================================================================
--- interpreter/platform/windows/SysActivity.hpp	(revision 11556)
+++ interpreter/platform/windows/SysActivity.hpp	(working copy)
@@ -61,7 +61,7 @@
     void close();
     void useCurrentThread();
     bool validateThread();
-    char *getStackBase(size_t stackSize);
+    char *getStackBase(int32_t *base, size_t stackSize);
     inline thread_id_t getThreadID() { return threadId; }
 
     static thread_id_t queryThreadID();
