[PATCH v2] __builtin_expect cleanup for iconv{,data}/*.c

Kalle Olavi Niemitalo kon@iki.fi
Wed Sep 10 17:48:00 GMT 2014


Florian Weimer <fweimer@redhat.com> writes:

> Has glibc a rule not to rely on implicit booleans?  Than the != 0
> variant would be preferred.

I'm not sure.  Roland McGrath has objected to implicit Boolean coercion
before; see <https://sourceware.org/ml/libc-alpha/2012-09/msg00218.html>
and <https://sourceware.org/ml/libc-alpha/2014-06/msg00119.html>.
If there is a consensus, then I guess someone should edit
<https://sourceware.org/glibc/wiki/Style_and_Conventions>, in which
some examples of good patterns nowadays do "if (buf)" or similar.
The GNU Coding Standards don't discuss the issue, AFAICS.



More information about the Libc-alpha mailing list