Skip to content

Commit 4bfde88

Browse files
yamtxiaoxiang781216
authored andcommitted
Discourage the use of LIBC_PRINT_EXTENSION
See the discussion in apache#13536
1 parent 8811eee commit 4bfde88

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

libs/libc/stdio/Kconfig

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,17 @@ config LIBC_PRINT_EXTENSION
110110
bool
111111
default n
112112
---help---
113-
Enables vsprintf supports using "%p*" to print.
113+
Enables non-standard "%p*" extensions for the printf family.
114+
115+
CAVEAT: If your system is using any of the printf C family
116+
functions, it's probably unsafe to enable this option because
117+
the extension is not compatible with the C standard. Namely,
118+
an ordinary character following a "%p" conversion is interpreted
119+
in a non-standard way, which might crash the code which expects
120+
the standard semantics. For that reason, in the future versions
121+
of NuttX, this extension might be removed, or changed in an
122+
API-incompatible way to avoid conflicts with the standards.
123+
(Eg. use different characters for converions specifiers,
124+
or switch to a completely separate API, say "nuttx_printf".)
114125

115126
endmenu #Standard C I/O

0 commit comments

Comments
 (0)