Possible solution for min()/max() war
How about:
#define AssertNow(x) switch(1) { case (x): case 0: }
as in:
AssertNow(sizeof(typeof(x)) == sizeof(typeof(y)));
I'm not sure if gcc optimizes this away, but it would be easy for someone to find out.
I didn't invent this.
-Andy
Quoted 5 lines
And I was hoping that somebody could produce some gcc magic replacement for
BUG()that means "don't compile me". Perhaps a bit of illegal assembler code with a line reference in? Surely gcc must have something like__builtin_wont_compile()? It just needs to be a leaf of the RTL that evokes a compile error.