From: Bruno Haible Date: Mon, 13 Apr 2026 21:44:24 +0000 (+0200) Subject: stdbit-h: Port to Intel icpx C++ compiler. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e1532bc0fee2c45e9b673df4119af46fbb3be7ac;p=thirdparty%2Fgnulib.git stdbit-h: Port to Intel icpx C++ compiler. * lib/stdbit.in.h: With the Intel icpx C++ compiler, include and , and define the __STDC_ENDIAN_* macros. * doc/posix-headers/stdbit.texi: Document the Intel icpx bug. --- diff --git a/ChangeLog b/ChangeLog index 4d1ae29513..ed84178e00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2026-04-13 Bruno Haible + + stdbit-h: Port to Intel icpx C++ compiler. + * lib/stdbit.in.h: With the Intel icpx C++ compiler, include + and , and define the __STDC_ENDIAN_* macros. + * doc/posix-headers/stdbit.texi: Document the Intel icpx bug. + 2026-04-13 Paul Eggert error-h: port to Intel OneAPI icx 2026.0.0 diff --git a/doc/posix-headers/stdbit.texi b/doc/posix-headers/stdbit.texi index 2e1556a451..87f91d0a54 100644 --- a/doc/posix-headers/stdbit.texi +++ b/doc/posix-headers/stdbit.texi @@ -14,6 +14,9 @@ Portability problems fixed by Gnulib: @item This header file is missing on many non-C23 platforms: glibc 2.38, macOS 14, FreeBSD 14.0, NetBSD 10.0, OpenBSD 7.5, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15. +@item +This header file does not define the necessary types +with the Intel @code{icpx} C++ compiler. @end itemize Portability problems not fixed by Gnulib: diff --git a/lib/stdbit.in.h b/lib/stdbit.in.h index 8b61300041..bcc883b3de 100644 --- a/lib/stdbit.in.h +++ b/lib/stdbit.in.h @@ -37,7 +37,7 @@ #error "Please include config.h first." #endif -#if !@HAVE_STDBIT_H@ +#if !@HAVE_STDBIT_H@ || (defined __cplusplus && defined __INTEL_CLANG_COMPILER) /* Get size_t. */ # include #endif @@ -46,7 +46,8 @@ || (!defined __UINT_FAST64_TYPE__ \ && (@GNULIB_STDC_MEMREVERSE8U@ \ || @GNULIB_STDC_LOAD8@ || @GNULIB_STDC_LOAD8_ALIGNED@ \ - || @GNULIB_STDC_STORE8@ || @GNULIB_STDC_STORE8_ALIGNED@))) + || @GNULIB_STDC_STORE8@ || @GNULIB_STDC_STORE8_ALIGNED@)) \ + || (defined __cplusplus && defined __INTEL_CLANG_COMPILER)) /* Get intN_t, uintN_t, int_leastN_t, uint_leastN_t. */ # include #endif @@ -194,7 +195,7 @@ extern "C" { /* Some systems are only missing C2y features in stdbit.h. */ -#if !@HAVE_STDBIT_H@ +#if !@HAVE_STDBIT_H@ || (defined __cplusplus && defined __INTEL_CLANG_COMPILER) /* ISO C 23 § 7.18.1 General */ @@ -211,6 +212,11 @@ extern "C" { # define __STDC_ENDIAN_NATIVE__ __STDC_ENDIAN_LITTLE__ #endif +#endif + + +/* Some systems are only missing C2y features in stdbit.h. */ +#if !@HAVE_STDBIT_H@ /* ISO C 23 § 7.18.3 Count Leading Zeros */