I was reading source code this morning and came across this curious line in a header file:
JS_STATIC_ASSERT(sizeof(JSGCThing) >= sizeof(JSString));
The effect of this macro is to check at compile time that
sizeof(JSGCThing) >= sizeof(JSString). If the condition is not met, compilation fails with an error.
The puzzle is: how does this work? A hint is in the comments.