]> Savannah Git Hosting - gnulib.git/commitdiff
stdbit-h: Detect MSVC __typeof__ support.
authorCollin Funk <collin.funk1@gmail.com>
Fri, 20 Dec 2024 01:53:48 +0000 (17:53 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Fri, 20 Dec 2024 01:53:48 +0000 (17:53 -0800)
* lib/stdbit.in.h (_GL_STDBIT_TYPEOF_CAST): Use __typeof__ on Visual
Studio 2022 version 17.9 and later.

ChangeLog
lib/stdbit.in.h

index cf98e92c62c2d452338928a941d619a617a6ad85..59fa232bd768cf1dea30455d4bfc148d8a7b5df9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-12-19  Collin Funk  <collin.funk1@gmail.com>
+
+       stdbit-h: Detect MSVC __typeof__ support.
+       * lib/stdbit.in.h (_GL_STDBIT_TYPEOF_CAST): Use __typeof__ on Visual
+       Studio 2022 version 17.9 and later.
+
 2024-12-18  Pádraig Brady  <P@draigBrady.com>
 
        crc-x86_64: fix build failure due to indentation
index 20b9f4f46621b687df2872d418316e6d269595c1..91d237d7ad090aac8f2fd5c878bb12dc4f3b1b5a 100644 (file)
@@ -77,7 +77,8 @@ _GL_INLINE_HEADER_BEGIN
 #if ((defined __GNUC__ && 2 <= __GNUC__) \
      || (defined __clang_major__ && 4 <= __clang_major__) \
      || (defined __IBMC__ && 1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
-     || (defined __SUNPRO_C && 0x5110 <= __SUNPRO_C && !__STDC__))
+     || (defined __SUNPRO_C && 0x5110 <= __SUNPRO_C && !__STDC__) \
+     || (defined _MSC_VER && 1939 <= _MSC_VER))
 # define _GL_STDBIT_TYPEOF_CAST(a, b) ((__typeof__ (a)) (b))
 #elif 202311 <= __STDC_VERSION__
 # define _GL_STDBIT_TYPEOF_CAST(a, b) ((typeof (a)) (b))