D
Daniel Vallstrom
Dan said:
[snip discussion about having assert() take a bool argument]
Fortunately, because the vast majority of assert() arguments don't have
bool type even when they are conceptually booleans. Would you like
writing assert((bool)(a == b)) instead of assert(a == b) ?
I just meant that if "assert(e)" was, in one way or another, stipulated
to mean "assert((bool)e)", then everything would still work. That is,
in C99, "assert(e)" is equivalent to "assert((bool)e)".
Agreed.The good question is if there was/is any known C89 implementation where
assert(pointer) doesn't work as intuitively expected by its (mis)user.
To me, it looks like a bug in the C89 specification.
Daniel Vallstrom