fix static assertion problem for gcc (bug 4022)

This commit is contained in:
Brian Paul 2005-08-10 14:42:21 +00:00
parent 6b563bda43
commit 63c9ebeaff

View file

@ -29,7 +29,10 @@
extern "C" {
#endif
#define static_assert(expr) do { int _array[(expr) ? 1 : 0]; _array[0]; } while (0)
/* Compile-time assertions. If the expression is zero, try to declare an
* array of size [-1] to cause compilation error.
*/
#define static_assert(expr) do { int _array[(expr) ? 1 : -1]; _array[0]; } while (0)
void slang_alloc_free (void *);
void *slang_alloc_malloc (unsigned int);