kopia lustrzana https://github.com/micropython/micropython
py/stackctrl: Add gcc pragmas to ignore dangling-pointer warning.
This warning became apparent in gcc 13. Signed-off-by: Damien George <damien@micropython.org>pull/11402/head
rodzic
61b8e1b2d8
commit
f1c6cb7725
|
@ -28,8 +28,15 @@
|
||||||
#include "py/stackctrl.h"
|
#include "py/stackctrl.h"
|
||||||
|
|
||||||
void mp_stack_ctrl_init(void) {
|
void mp_stack_ctrl_init(void) {
|
||||||
|
#if __GNUC__ >= 13
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdangling-pointer"
|
||||||
|
#endif
|
||||||
volatile int stack_dummy;
|
volatile int stack_dummy;
|
||||||
MP_STATE_THREAD(stack_top) = (char *)&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) {
|
void mp_stack_set_top(void *top) {
|
||||||
|
|
Ładowanie…
Reference in New Issue