<foo.h>
headers not in freestandingSection: 16.4.2 [organization] Status: New Submitter: Ben Craig Opened: 2024-01-26 Last modified: 2024-08-21
Priority: 3
View all issues with New status.
Discussion:
There are many C-ish <cfoo>
headers in freestanding. There isn't anything that
requires the matching C <foo.h>
headers to be in freestanding.
[2024-08-21; Reflector poll]
Set priority to 3 after reflector poll.
Some discomfort requiring errno.h
and wchar.h
to be freestanding in C++
when they are not in C23. string.h
is not freestanding in C17, but is in C23
(but C++ is still based on C17).
stdlib.h
is "conditionally partially freestanding" in C23, but not in C17.
Suggestion to incorporate this into P3348.
Proposed resolution:
This wording is relative to N4971.
Modify 16.4.2.3 [headers] as indicated:
-9- 17.14 [support.c.headers], C standard library headers, describes the effects of using the
name.h
(C header) form in a C++ program. Thename.h
form is the corresponding C header form.
Modify 16.4.2.5 [compliance] as indicated:
-2- A freestanding implementation has an implementation-defined set of headers. This set shall include at least the headers shown in Table 27 and the corresponding C header form (16.4.2.3 [headers]) of each of the C++ headers for C library facilities (Table 25) included in Table 27.