I created a new macro PARROT_STATIC_ASSERT(condition) for assertions that can 
get checked at compile time, for conditions that can be known at compile time.

For example, the first assertion is that sizeof(opcode_t) == sizeof(INTVAL).

    PARROT_STATIC_ASSERT( sizeof(INTVAL) == sizeof(opcode_t) );

If this failed, it would throw out an error like this:

src/global_setup.c: In function ‘init_world’:
src/global_setup.c:184:1: error: size of array ‘static_assertion_at_line_184’ 
is negative

Let me know if there's anything weird that comes along.

xoxo,
Andy

--
Andy Lester => [email protected] => www.petdance.com => AIM:petdance

_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to