Re:Ratatoi is a C libary that wraps stdlib's strtol (as atoi...
by wahern on Wednesday May 21, 2025 @07:33PM
(#44057317)
It's a consequence of the peculiarity of C type semantics, which disallows implicit conversions of pointer-to-pointer to pointer-to-pointer-to-const. C23 6.5.16.1 EXAMPLE 3 explains why:
There are proposals on the table for C2y to redefine various APIs, including strtol, strchr, memcpy, etc, to preserve const correctness. Implementations might make use of _Generic (there are some issues there, though), newly specified language features, or possibly use internal extensions not available in the language proper, to accomplish this.
[ Parent
| on HN ]
There are no comments on this comment yet.