]> Savannah Git Hosting - gnulib.git/commitdiff
intprops: Detect MSVC __typeof__ support.
authorCollin Funk <collin.funk1@gmail.com>
Fri, 20 Dec 2024 01:59:57 +0000 (17:59 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Fri, 20 Dec 2024 01:59:57 +0000 (17:59 -0800)
* lib/intprops-internal.h (_GL_HAVE___TYPEOF__): Copy condition from
lib/stdbit.in.h.

ChangeLog
lib/intprops-internal.h

index 59fa232bd768cf1dea30455d4bfc148d8a7b5df9..4a453a39f6a062a254a54a1d4a2f977d1b213438 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2024-12-19  Collin Funk  <collin.funk1@gmail.com>
 
+       intprops: Detect MSVC __typeof__ support.
+       * lib/intprops-internal.h (_GL_HAVE___TYPEOF__): Copy condition from
+       lib/stdbit.in.h.
+
        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.
index c8cc0e20194db34f40353b1818f3c9e7529487f4..0b7e1f539aa7f182115670fcd97acc72b603f0c2 100644 (file)
 
 /* Does the __typeof__ keyword work?  This could be done by
    'configure', but for now it's easier to do it by hand.  */
-#if (2 <= __GNUC__ \
-     || (4 <= __clang_major__) \
-     || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
-     || (0x5110 <= __SUNPRO_C && !__STDC__))
+#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 _MSC_VER && 1939 <= _MSC_VER))
 # define _GL_HAVE___TYPEOF__ 1
 #else
 # define _GL_HAVE___TYPEOF__ 0