From b46d001f6da61c0f25d1c8a30ad0de2f13ad5cc4 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Wed, 2 Jul 2025 14:07:37 +0800 Subject: [PATCH] change(newlib): COMPILER_ASSERT_NDEBUG_EVALUATE default value changed to 'n' Closes https://github.com/espressif/esp-idf/issues/2758 --- Kconfig | 5 +---- docs/en/migration-guides/release-6.x/6.0/system.rst | 7 ++++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Kconfig b/Kconfig index 5e19164a5e..ad6dc33691 100644 --- a/Kconfig +++ b/Kconfig @@ -407,7 +407,7 @@ mainmenu "Espressif IoT Development Framework Configuration" config COMPILER_ASSERT_NDEBUG_EVALUATE bool "Enable the evaluation of the expression inside assert(X) when NDEBUG is set" - default y + default n help When NDEBUG is set, assert(X) will not cause code to trigger an assertion. With this option set, assert(X) will still evaluate the expression X, though @@ -417,9 +417,6 @@ mainmenu "Espressif IoT Development Framework Configuration" This is not according to the standard, which states that the assert(X) should be replaced with ((void)0) if NDEBUG is defined. - In ESP-IDF v6.0 the default behavior will change to "no" to be in line with the - standard. - choice COMPILER_FLOAT_LIB_FROM prompt "Compiler float lib source" default COMPILER_FLOAT_LIB_FROM_RVFPLIB if ESP_ROM_HAS_RVFPLIB diff --git a/docs/en/migration-guides/release-6.x/6.0/system.rst b/docs/en/migration-guides/release-6.x/6.0/system.rst index 354f377f10..79f7b60d97 100644 --- a/docs/en/migration-guides/release-6.x/6.0/system.rst +++ b/docs/en/migration-guides/release-6.x/6.0/system.rst @@ -233,7 +233,12 @@ For the gcov functionality, include the ``esp_gcov.h`` header file instead of `` System Console (STDIO) ---------------------- -``esp_vfs_cdcacm.h`` has been moved to the new component ``esp_usb_cdc_rom_console``, you will now have to add an explicit ``REQUIRES`` for ``esp_usb_cdc_rom_console`` if using any functions from this header. +``esp_vfs_cdcacm.h`` has been moved to the new component ``esp_usb_cdc_romconsole``, you will now have to add an explicit ``REQUIRES`` for ``esp_usb_cdc_rom_console`` if using any functions from this header. + +LibC +------ + +:ref:`CONFIG_COMPILER_ASSERT_NDEBUG_EVALUATE` default value is changed to `n`. This means asserts will no longer evaluate the expression inside the assert when ``NDEBUG`` is set. This reverts the default behavior to be in line with the C standard. ULP ---