Title
Type of std::fexcept_t
Status
wp
Section
[cfenv.syn]
Submitter
Sam Elliott

Created on 2023-03-13.00:00:00 last changed 18 months ago

Messages

Date: 2023-06-19.14:50:03

Proposed resolution:

This wording is relative to N4928.

  1. Modify [cfenv.syn], header <cfenv> synopsis, as indicated:

    […]
    namespace std {
      // types
      using fenv_t = object type;
      using fexcept_t = integerobject type;
      […]
    }
    
Date: 2023-06-17.00:00:00

[ 2023-06-17 Approved at June 2023 meeting in Varna. Status changed: Voting → WP. ]

Date: 2023-05-15.00:00:00

[ 2023-05-24; Reflector poll ]

Set status to Tentatively Ready after six votes in favour during reflector poll.

Date: 2023-03-19.08:38:41

<cfenv>, as specified in [cfenv.syn], requires fexcept_t to be an integer type:

using fexcept_t = integer type;

<cfenv> was initially added to the (first) Technical Report on C++ Library Extensions via N1568 and then integrated into the C++ Working Draft N2009 in Berlin (April, 2006).

However, C99 does not actually require that fexcept_t is an integer type, it only requires:

The type fexcept_t represents the floating-point status flags collectively, including any status the implementation associates with the flags.

Relaxing this requirement should not cause conforming C++ implementations to no longer be conforming. In fact, this should enable conforming C implementations to become conforming C++ implementations without an ABI break. The only incompatibility I foresee is where a user's program is initializing a std::fexcept_t with an integer value, which would become invalid on some C++ implementations (but not those that were previously conforming).

History
Date User Action Args
2023-06-19 14:50:03adminsetmessages: + msg13650
2023-06-19 14:50:03adminsetstatus: voting -> wp
2023-06-12 08:52:25adminsetstatus: ready -> voting
2023-05-24 14:09:14adminsetmessages: + msg13560
2023-05-24 14:09:14adminsetstatus: new -> ready
2023-03-18 14:54:55adminsetmessages: + msg13458
2023-03-13 00:00:00admincreate