Title
Header <stdbit.h> is not yet freestanding
Status
new
Section
[stdbit.h.syn]
Submitter
Jiang An

Created on 2025-04-24.00:00:00 last changed 1 week ago

Messages

Date: 2025-04-27.08:49:42

Proposed resolution:

This wording is relative to N5008.

  1. Modify Table 27 [tab:headers.cpp.fs] as indicated:

    Table 27: C++ headers for freestanding implementations [tab:headers.cpp.fs]
    Subclause Header
    […]
    [bit] Bit manipulation <bit>
    [stdbit.h.syn] C-compatible bit manipulation <stdbit.h>
    [array] Class template `array` <array>
    […]
  2. Modify [stdbit.h.syn], header <stdbit.h> synopsis, as indicated:

    // all freestanding
    #define __STDC_VERSION_STDBIT_H__ 202311L
    
    #define __STDC_ENDIAN_BIG__    see below
    #define __STDC_ENDIAN_LITTLE__ see below
    #define __STDC_ENDIAN_NATIVE__ see below
    
    […]
    
Date: 2025-04-24.00:00:00

Per C23/WG14 N3220 4 p7, <stdbit.h> is freestanding in C23, but C++ hasn't required it for a freestanding implementation. LWG 4049 is related but doesn't cover this, because there's no <cstdbit> standard header.

History
Date User Action Args
2025-04-27 08:49:42adminsetmessages: + msg14731
2025-04-24 00:00:00admincreate