In said:
If your point is that much of <string.h> could be provided
with a freestanding implementation, sure, and the hosted
portion of the C standard provides guidance as to that
interface. Virtually every vendor of development platforms
for standalone targets provides as much as they can of the
hosted portion of the library, sometimes even including
printf.
Which *guarantees* exactly zilch WRT the portability of code including
other headers than the ones required for freestanding implementations.
Because there is no problem in practice, there has
There is no problem with assuming at least 32-bit int's for the
current hosted implementations in practice, either. And programs
developed for such implementations don't get ported to freestanding
implementations in practice, either. So, make up your mind: do we
place our discussion in the context of the C standard or outside it?
been remarkably little pressure to tweak the standard to
include those additional functions in the requirements for
*all* freestanding implementations.
Then, the C code that is *guaranteed* to be portable to *all*
freestanding implementations is not allowed to include other headers
than the ones required for freestanding implementations. It's as
simple as that. There is little point in invoking the C standard once
you have to use features NOT guaranteed by the C standard. Which means
the bulk of Clause 7 when talking about freestanding implementations.
Feel free to propose
it (again) during the initial phase of work toward C0x.
^^^^^
If the committee was stupid enough to reject it the first time, why should
I expect a different decision the second time?
Except for <assert.h>, certain parts of <stdio.h> and the dynamic
memory allocation functions, there is precious little in the C89 library
specification that couldn't be supported on freestanding implementations
or that wouldn't be useful on them. They'd also greatly benefit from the
C99 single precision additions to <math.h>, double precision being seldom
used on most embedded control applications.
Dan