]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
stdbit-h: Port to Intel icpx C++ compiler.
authorBruno Haible <bruno@clisp.org>
Mon, 13 Apr 2026 21:44:24 +0000 (23:44 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Apr 2026 21:44:57 +0000 (23:44 +0200)
* lib/stdbit.in.h: With the Intel icpx C++ compiler, include <stddef.h>
and <stdint.h>, and define the __STDC_ENDIAN_* macros.
* doc/posix-headers/stdbit.texi: Document the Intel icpx bug.

ChangeLog
doc/posix-headers/stdbit.texi
lib/stdbit.in.h

index 4d1ae29513c525e0917b13f4ca70890939226c6d..ed84178e00b50a8ad052c364d7354e0b4bd8a3e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-04-13  Bruno Haible  <bruno@clisp.org>
+
+       stdbit-h: Port to Intel icpx C++ compiler.
+       * lib/stdbit.in.h: With the Intel icpx C++ compiler, include <stddef.h>
+       and <stdint.h>, and define the __STDC_ENDIAN_* macros.
+       * doc/posix-headers/stdbit.texi: Document the Intel icpx bug.
+
 2026-04-13  Paul Eggert  <eggert@cs.ucla.edu>
 
        error-h: port to Intel OneAPI icx 2026.0.0
index 2e1556a4514a68503632c8413ce5556aa3c9f712..87f91d0a54a6716de534863bf6edae187cdcc713 100644 (file)
@@ -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:
index 8b61300041b26adaecac9921f6afd478db10c8d0..bcc883b3de37bd4b98300e803454fc58367961fc 100644 (file)
@@ -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 <stddef.h>
 #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 <stdint.h>
 #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  */