It’s defined in a header file, so that every execution unit that includes it will duplicate the code. But why would anyone ever want to compile multiple copies of this code into their executable? It’s completely identical, is not supposedand there’s no reason to ever runoptimize the path where an assertion fails, because that should never happen in production code. (And even when it does, and can run at leastit only runs once in development.)
The behavior is completely different between C and C++.
There is already an assert() in the standard library that is absolutely portable, does the same thing in both languages, and is easier to use.