]> git.proxmox.com Git - mirror_qemu.git/blobdiff - include/qemu/osdep.h
Merge tag 'mem-2022-10-28' of https://github.com/davidhildenbrand/qemu into staging
[mirror_qemu.git] / include / qemu / osdep.h
index 625298c8bc90ae2cf6d2841419ba0eb41188bc59..b9c4307779c5dee2bd8366f3f7d5d41ac1e0b35e 100644 (file)
@@ -186,6 +186,14 @@ void QEMU_ERROR("code path is reachable")
 #define qemu_build_not_reached()  g_assert_not_reached()
 #endif
 
+/**
+ * qemu_build_assert()
+ *
+ * The compiler, during optimization, is expected to prove that the
+ * assertion is true.
+ */
+#define qemu_build_assert(test)  while (!(test)) qemu_build_not_reached()
+
 /*
  * According to waitpid man page:
  * WCOREDUMP