@@ -42,6 +42,7 @@ void acpi_ut_init_stack_ptr_trace(void)
#pragma GCC diagnostic ignored "-Wdangling-pointer="
#endif
acpi_gbl_entry_stack_pointer = ¤t_sp;
+#pragma GCC diagnostic pop
}
/*******************************************************************************
@@ -61,8 +62,12 @@ void acpi_ut_track_stack_ptr(void)
acpi_size current_sp;
if (¤t_sp < acpi_gbl_lowest_stack_pointer) {
+#pragma GCC diagnostic push
+#if defined(__GNUC__) && __GNUC__ >= 12
+#pragma GCC diagnostic ignored "-Wdangling-pointer="
+#endif
acpi_gbl_lowest_stack_pointer = ¤t_sp;
-#pragma GCC diagnostic pop
+#pragma GCC diagnostic popmake
}
if (acpi_gbl_nesting_level > acpi_gbl_deepest_nesting) {