3 ms·
"If you accidentally pass a null pointer as the argument for a ‘%s’ conversion, the GNU C Library prints it as ‘(null)’. We think this is more useful than crash
by pjtr 11y ago
"If you accidentally pass a null pointer as the argument for a ‘%s’ conversion, the GNU C Library prints it as ‘(null)’. We think this is more useful than crashing. But it’s not good practice to pass a null argument intentionally."
https://www.gnu.org/software/libc/manual/html_node/Other-Output-Conversions.html https://www.gnu.org/software/libc/manual/html_node/Other-Out...
It's documented.
- cperciva 11y agoThere are more C libraries than just GNU C...
- kazinator 11y agoIf there weren't, we wouldn't need a library clause in the ISO C standard to know what is portable among them. That doesn't add up to an argument that libraries shouldn't have documented extensions in areas left undefined by the standard.