>> > Ordinary C "assert (X)" means "crash if X is false". >> > But sa_assert (X) means "assume that X is true". >> > These are two very different different things.
> ... for both macros, in the thinking of the programmer, it's an > assertion: the programmer asserts (that is, guarantees) a certain > condition. The difference is only to whom he does the assertion: > to the runtime execution in one case, to the static analysis tool > in the other case. I'm afraid it's not that simple, as both macros can be used by static analysis tools. Perhaps we'll just have to agree to disagree about what assert (X) means in C. To most C programmers, I think assert (X) means "crash if X is false" (assuming NDEBUG). The traditional Hoare-logic meaning of "assert" is a related notion, but it's not the same thing. I wish the C folks had chosen a different name for their "assert"....
