Merge pull request #81 from lhdjply/patch-1

py/stackctrl: Add gcc pragmas to ignore dangling-pointer warning.
This commit is contained in:
Gabor Kiss-Vamosi 2024-05-30 21:59:40 +02:00 committed by GitHub
commit 81d3c1215a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,8 +28,15 @@
#include "py/stackctrl.h"
void mp_stack_ctrl_init(void) {
#if __GNUC__ >= 13
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdangling-pointer"
#endif
volatile int stack_dummy;
MP_STATE_THREAD(stack_top) = (char *)&stack_dummy;
#if __GNUC__ >= 13
#pragma GCC diagnostic pop
#endif
}
void mp_stack_set_top(void *top) {