From c1ac2754e106b075b461efea32f6035a878d7427 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 17 Oct 2024 15:54:09 +0900 Subject: [PATCH] Discourage the use of LIBC_PRINT_EXTENSION See the discussion in https://github.com/apache/nuttx/pull/13536 --- libs/libc/stdio/Kconfig | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libs/libc/stdio/Kconfig b/libs/libc/stdio/Kconfig index 97ecea67d7c00..0e9f714f292f0 100644 --- a/libs/libc/stdio/Kconfig +++ b/libs/libc/stdio/Kconfig @@ -110,6 +110,17 @@ config LIBC_PRINT_EXTENSION bool default n ---help--- - Enables vsprintf supports using "%p*" to print. + Enables non-standard "%p*" extensions for the printf family. + + CAVEAT: If your system is using any of the printf C family + functions, it's probably unsafe to enable this option because + the extension is not compatible with the C standard. Namely, + an ordinary character following a "%p" conversion is interpreted + in a non-standard way, which might crash the code which expects + the standard semantics. For that reason, in the future versions + of NuttX, this extension might be removed, or changed in an + API-incompatible way to avoid conflicts with the standards. + (Eg. use different characters for converions specifiers, + or switch to a completely separate API, say "nuttx_printf".) endmenu #Standard C I/O