system.h (TEST_BIT): New macro.
[gcc.git] / gcc / system.h
index b20b5cfde1d2041276f62cc2042a34331e6adb1f..f216230db0a377c3200130e10a13af06ec561dd8 100644 (file)
@@ -491,6 +491,7 @@ extern void *realloc (void *, size_t);
 #endif
 
 #ifdef HAVE_INTTYPES_H
+#define __STDC_FORMAT_MACROS
 #include <inttypes.h>
 #endif
 
@@ -1070,7 +1071,10 @@ helper_const_non_const_cast (const char *p)
 #define DEBUG_VARIABLE
 #endif
 
-/* Get definitions of HOST_WIDE_INT and HOST_WIDEST_INT.  */
+/* General macro to extract bit Y of X.  */
+#define TEST_BIT(X, Y) (((X) >> (Y)) & 1)
+
+/* Get definitions of HOST_WIDE_INT.  */
 #include "hwint.h"
 
 #endif /* ! GCC_SYSTEM_H */