mesa: add STATIC_ASSERT() macro for compile-time assertions
authorBrian Paul <brianp@vmware.com>
Tue, 29 Nov 2011 01:13:43 +0000 (18:13 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 30 Nov 2011 13:57:36 +0000 (06:57 -0700)
commit15be8b4bf01a4f01b2afcea82bd042f3a98b9ac1
tree0d8a9031812d346a2bf6ef400fda03b58187190d
parent25c8a112abf4bbf271c6972f7539ca2a1c7683bd
mesa: add STATIC_ASSERT() macro for compile-time assertions

This can be used to check that tables have the right number of entries,
etc. at compile-time.  This will hopefully catch things that are missed
if particular drivers aren't tested, for example.

v2: Simplify the macro to omit the extra line number info (the compiler
already indicates the line number).  And wrap the macro for readability.
src/mesa/main/compiler.h