nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Nmh-commits Digest, Vol 108, Issue 11

2018-01-22 12:56:39


Bakul Shah wrote:
      fmttest.c: Avoid `++' with bools, silencing compiler warnings.
i hate that perfectly reasonable, traditional idioms have to be avoided
for this reason.

No strong reason to use type bool in the first place. It didn’t show up till 
c99.

pointers aren't booleans. integers aren't booleans. being able to silently treat either as a boolean has meant that expressions with parenthesis in the wrong place often compile without warnings and then produced unexpected results. bool was invented for a reason and we should be using it everywhere. even if that means we can't say ++.

--
P Vixie


--
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>