Peter Geoghegan <pg(at)bowt(dot)ie> writes:
> The proposal doesn't seem like an improvement. Technically the
> assertion cannot possibly fail here because the earlier assertion
> would always fail instead, so strictly speaking it is redundant -- at
> least right now. That is true. But it seems much more important to be
> consistent about which variant to use. Especially because there is
> obviously no overhead in builds without assertions enabled.
Even in an assert-enabled build, wouldn't you expect the compiler to
optimize away the second assertion as unreachable code?
regards, tom lane