|
@@ -116,13 +116,18 @@
|
116
|
116
|
// Utility functions
|
117
|
117
|
//
|
118
|
118
|
|
119
|
|
-// Location of a variable on its stack frame. Returns a value above
|
120
|
|
-// the stack (once the function returns to the caller).
|
121
|
|
-char* top_of_stack() {
|
|
119
|
+#pragma GCC diagnostic push
|
|
120
|
+#pragma GCC diagnostic ignored "-Wreturn-local-addr"
|
|
121
|
+
|
|
122
|
+// Location of a variable in its stack frame.
|
|
123
|
+// The returned address will be above the stack (after it returns).
|
|
124
|
+char *top_of_stack() {
|
122
|
125
|
char x;
|
123
|
126
|
return &x + 1; // x is pulled on return;
|
124
|
127
|
}
|
125
|
128
|
|
|
129
|
+#pragma GCC diagnostic pop
|
|
130
|
+
|
126
|
131
|
// Count the number of test bytes at the specified location.
|
127
|
132
|
inline int32_t count_test_bytes(const char * const start_free_memory) {
|
128
|
133
|
for (uint32_t i = 0; i < 32000; i++)
|