On Tue, 17 Sept 2024 at 13:52, Inbal Levi <[email protected]> wrote:
> Hello SG10, > We're in the process of rebasing C++ on C (we will see a paper today) and > wanted your input on what to do with the C macros: > https://en.cppreference.com/w/c/23 > (e.g __STDC_VERSION_STDCKDINT_H__ > <https://en.cppreference.com/mwiki/index.php?title=STDC_VERSION_STDCKDINT_H&action=edit&redlink=1> > , __STDC_VERSION_FENV_H__ <https://en.cppreference.com/w/c/numeric/fenv> might > be relevant) > > IIUC, we don't port these? > It's never been a question before, C17 didn't have any such macros. They're new in C23. > > https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html#Standard-Predefined-Macros-1 > I don't think that document is relevant, those macros are defined by library headers not the compiler. > > Should we consider redefining them in the __cplusplus shape? > The macro for <fenv.h> comes from a C header, and the C++ library doesn't add anything to that header. I don't see any point in the C++ library requiring new macros for a header that isn't controlled by the C++ implementation. We also haven't got a decision on what to do with the new math and numerics stuff in C23. For stdckdint.h we're not going to use the C header, so should not define the C macro. The proposal to add a C++ version of that header should consider whether a feature test macro is needed. If it is, it should be in the __cpp_lib_xxx form.
-- SG10 mailing list [email protected] https://lists.isocpp.org/mailman/listinfo.cgi/sg10
