K 10 svn:author V 2 bz K 8 svn:date V 27 2009-03-01T09:35:41.014330Z K 7 svn:log V 795 Add the new compile-time assertion macro CTASSERT_EQUAL(). It takes a positive integer constant (the expected value) and another positive integer, usually compile-time evaluated, e.g. CTASSERT_EQUAL(FOO_EXPECTED_SIZE, sizeof (struct foo)); While the classic CTASSERT() gives: error: size of array '__assert60' is negative this gives you: In function '__ctassert_equal_at_line_60': warning: '__expected_42_but_got[464ul]' is used uninitialized in this function and you can directly see the difference in the expected and the real value. CTASSERT_EQUAL() needs special compile time options to trigger thus keep it locally to this header. If it proves to be of general interest it can be moved to systm.h. Submitted by: jmallett Reviewed by: sam, warner, rwatson, jmallett (earlier versions) END