Skip to content

Commit

Permalink
Discourage the use of LIBC_PRINT_EXTENSION
Browse files Browse the repository at this point in the history
See the discussion in apache#13536
  • Loading branch information
yamt committed Oct 17, 2024
1 parent 737dc4f commit c1ac275
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion libs/libc/stdio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c1ac275

Please sign in to comment.