Skip to content

Commit b46d001

Browse files
committed
change(newlib): COMPILER_ASSERT_NDEBUG_EVALUATE default value changed to 'n'
Closes #2758
1 parent bc421db commit b46d001

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Kconfig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
407407

408408
config COMPILER_ASSERT_NDEBUG_EVALUATE
409409
bool "Enable the evaluation of the expression inside assert(X) when NDEBUG is set"
410-
default y
410+
default n
411411
help
412412
When NDEBUG is set, assert(X) will not cause code to trigger an assertion.
413413
With this option set, assert(X) will still evaluate the expression X, though
@@ -417,9 +417,6 @@ mainmenu "Espressif IoT Development Framework Configuration"
417417
This is not according to the standard, which states that the assert(X) should
418418
be replaced with ((void)0) if NDEBUG is defined.
419419

420-
In ESP-IDF v6.0 the default behavior will change to "no" to be in line with the
421-
standard.
422-
423420
choice COMPILER_FLOAT_LIB_FROM
424421
prompt "Compiler float lib source"
425422
default COMPILER_FLOAT_LIB_FROM_RVFPLIB if ESP_ROM_HAS_RVFPLIB

docs/en/migration-guides/release-6.x/6.0/system.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,12 @@ For the gcov functionality, include the ``esp_gcov.h`` header file instead of ``
233233
System Console (STDIO)
234234
----------------------
235235

236-
``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.
236+
``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.
237+
238+
LibC
239+
------
240+
241+
: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.
237242

238243
ULP
239244
---

0 commit comments

Comments
 (0)