Re: Code is truly awful, but sadly not unusual
/* can't happen */ ??
Isn't that most portably spelled "abort()"?
If the compiler can prove your assertion, it will generate no code. If it cannot, then it will cost you a few bytes of code. Either way, each time you change the surrounding code, the compiler will re-check. On any given platform, there may be non-portable alternatives that turn mistakes into a compile-time error.