std-aux: add XXX() macro

This commit is contained in:
Thomas Haller 2021-08-06 20:15:09 +02:00
parent 8b133746e0
commit 1d789ca44b
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -209,6 +209,13 @@ typedef uint64_t _nm_bitwise nm_be64_t;
} while (0)
#endif
/* This is similar nm_assert_not_reached(), but it's supposed to be used only during
* development. Like _XXX_ comments, they can be used as a marker that something still
* needs to be done. */
#define XXX(msg) \
nm_assert(!"X" \
"XX error: " msg "")
#define nm_assert_unreachable_val(val) \
({ \
nm_assert_not_reached(); \