"noreturn attribute ignored" warning with ESP-IDF v5.0.1
Posted: Thu May 04, 2023 9:19 pm
Hi there. Compiling with ESP-IDF v5.0.1, downloaded just now (we've just updated from v4.3.2), I'm getting some additional warnings from within the ESP-IDF header files themselves about the noreturn attribute being ignored, see below. Is this (a) just a "fact of life" given where version 5 is at the moment, or (b) might I be doing something wrong, or (c) should I be suppressing them, etc...?
Code: Select all
In file included from /home/ubxlib/.ubxlibpkg/esp_idf-v5.0.1/components/esp_hw_support/include/esp_intr_alloc.h:11,
from /home/ubxlib/.ubxlibpkg/esp_idf-v5.0.1/components/esp_hw_support/include/esp_cpu.h:20,
from /home/ubxlib/.ubxlibpkg/esp_idf-v5.0.1/components/esp_hw_support/include/spinlock.h:11,
from /home/ubxlib/.ubxlibpkg/esp_idf-v5.0.1/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:74,
from /home/ubxlib/.ubxlibpkg/esp_idf-v5.0.1/components/freertos/FreeRTOS-Kernel/include/freertos/portable.h:58,
from /home/ubxlib/.ubxlibpkg/esp_idf-v5.0.1/components/freertos/FreeRTOS-Kernel/include/freertos/FreeRTOS.h:70,
from /home/ubxlib/workspace/ubxlib_feature_espidf_v5_rmea@2/ubxlib/port/platform/esp-idf/src/u_port.c:36:
/home/ubxlib/.ubxlibpkg/esp_idf-v5.0.1/components/esp_common/include/esp_err.h:79:1: warning: '_Noreturn' attribute directive ignored [-Wattributes]
79 | void _esp_error_check_failed(esp_err_t rc, const char *file, int line, const char *function, const char *expression) __attribute__((noreturn));
| ^~~~
In file included from /home/ubxlib/.ubxlibpkg/esp_idf-v5.0.1/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:83,
from /home/ubxlib/.ubxlibpkg/esp_idf-v5.0.1/components/freertos/FreeRTOS-Kernel/include/freertos/portable.h:58,
from /home/ubxlib/.ubxlibpkg/esp_idf-v5.0.1/components/freertos/FreeRTOS-Kernel/include/freertos/FreeRTOS.h:70,
from /home/ubxlib/workspace/ubxlib_feature_espidf_v5_rmea@2/ubxlib/port/platform/esp-idf/src/u_port.c:36:
/home/ubxlib/.ubxlibpkg/esp_idf-v5.0.1/components/esp_system/include/esp_system.h:75:1: warning: '_Noreturn' attribute directive ignored [-Wattributes]
75 | void esp_restart(void) __attribute__ ((noreturn));
| ^~~~
/home/ubxlib/.ubxlibpkg/esp_idf-v5.0.1/components/esp_system/include/esp_system.h:115:1: warning: '_Noreturn' attribute directive ignored [-Wattributes]
115 | void __attribute__((noreturn)) esp_system_abort(const char* details);
| ^~~~