Skip to content
Snippets Groups Projects
Commit dc7d3f53 authored by Damien George's avatar Damien George Committed by Mo Krautwald
Browse files

py/stackctrl: Add gcc pragmas to ignore dangling-pointer warning.


This warning became apparent in gcc 13.

Signed-off-by: default avatarDamien George <damien@micropython.org>
parent 7c54b642
No related branches found
No related tags found
No related merge requests found
...@@ -28,8 +28,15 @@ ...@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment