]> git.draconx.ca Git - cdecl99.git/commitdiff
Better probe for __int64 support.
authorNick Bowler <nbowler@draconx.ca>
Thu, 29 Feb 2024 03:52:00 +0000 (22:52 -0500)
committerNick Bowler <nbowler@draconx.ca>
Thu, 29 Feb 2024 03:52:00 +0000 (22:52 -0500)
In an expression like sizeof (unsigned garbage), the VAX C compiler
warns but otherwise ignores the garbage identifier, treating it the
same as sizeof (unsigned).  Thus, the AC_CHECK_TYPES probe gives a
false positive result on this compiler.

The test can be improved by using the fourth argument to add a real
object declaration to the test program.

configure.ac

index 4d9ad34a84ccc370ea0ad7b304bbb93721abaa5c..3cd249f34c01a13b4107ed7771abccb92c4d8e7b 100644 (file)
@@ -29,7 +29,8 @@ gl_EARLY
 
 AC_HEADER_ASSERT
 AC_TYPE_UNSIGNED_LONG_LONG_INT
-AC_CHECK_TYPES([unsigned __int64])
+AC_CHECK_TYPES([unsigned __int64], [], [],
+  [unsigned __int64 foo = -1; /* avoid false positive result on VAX C */])
 AC_C_FLEXIBLE_ARRAY_MEMBER
 AC_C_INLINE
 DX_C_FOR_DECLARATIONS