Skip to content
Snippets Groups Projects
Commit c68c5566 authored by Damien George's avatar Damien George Committed by q3k
Browse files

micropython: cherry pick PR 11464 from upstream micropython


Original commit (f1c6cb7725960487195daa5c5c196fd8d3563811)

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 3953812b
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment