Guard GCC13 pragma

This commit is contained in:
Scott Shawcroft 2023-04-28 11:28:48 -07:00
parent f837f2438a
commit 18207cd547
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
1 changed files with 3 additions and 0 deletions

View File

@ -31,7 +31,10 @@ void mp_stack_ctrl_init(void) {
// Force routine to not be inlined. Better guarantee than MP_NOINLINE for -flto.
__asm volatile ("");
#pragma GCC diagnostic push
#if __GNUC__ > 12
// Introduced in GCC 13
#pragma GCC diagnostic ignored "-Wdangling-pointer"
#endif
volatile int stack_dummy;
MP_STATE_THREAD(stack_top) = (char *)&stack_dummy;
#pragma GCC diagnostic pop