[cstdlib.syn] Add missing index entries and remove stray entries - #9309
Conversation
c8f4ac7 to
b0a168a
Compare
| \indexlibraryglobal{mbstowcs}% | ||
| \indexlibraryglobal{mbtowc}% | ||
| \indexlibraryglobal{qsort}% | ||
| \indexlibraryglobal{quick_exit}% |
There was a problem hiding this comment.
We removed this here, but didn't add \libglobal below, it seems.
There was a problem hiding this comment.
This is intentional for all of the comments that you've left. All of the functions that have not received \libglobal formatting are defined in some other place, such as https://eel.is/c++draft/c.mb.wcs#lib:mbstowcs
We don't usually add an index entry for forward declarations, and https://eel.is/c++draft/cstdlib.syn#1 explicitly exempts the functions defined in those other subclauses from receiving the "this does the same thing as in C" treatment.
I think indexing mbstowcs in this place would be outright misleading because it would incorrectly imply that the function is defined in [cstdlib.syn] with "this does the C thing" treatment.
| void* aligned_alloc(size_t alignment, size_t size); | ||
| void* calloc(size_t nmemb, size_t size); |
There was a problem hiding this comment.
What about these? No index entries?
There was a problem hiding this comment.
| void* malloc(size_t size); | ||
| void* realloc(void* ptr, size_t size); |
There was a problem hiding this comment.
| unsigned long long int @\libglobal{strtoull}@(const char* nptr, char** endptr, int base); | ||
|
|
||
| // \ref{c.mb.wcs}, multibyte / wide string and character conversion functions | ||
| int mblen(const char* s, size_t n); |
There was a problem hiding this comment.
all of these: no index entries?
There was a problem hiding this comment.
| constexpr div_t div(int numer, int denom); // freestanding | ||
| constexpr div_t @\libglobal{div}@(int numer, int denom); // freestanding | ||
| constexpr ldiv_t div(long int numer, long int denom); // freestanding; see \ref{library.c} | ||
| constexpr lldiv_t div(long long int numer, long long int denom); // freestanding; see \ref{library.c} |
There was a problem hiding this comment.
I don't think we normally put libglobal on every member of an overload set. I think that would generate multiple quasi-identical index entries.
There was a problem hiding this comment.
Index entries pointing to the same page are automatically merged by the indexing machinery.
The indexing in [cstdlib.syn] is really broken in a number of ways:
memalignment,free_sized,strfromf, etc. I haven't counted, but there should be at least a dozen missing entries here.randandsrand, even though those are defined in [c.math.rand]. Traditionally, we do not index declarations.\indexlibrayglobalmakes it difficult to maintain the indexing in this area. Inline\libglobalis better.