Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Why _Bool was not defined as enum in C99? Date: Wed, 14 Sep 2016 16:23:26 -0700 Organization: None to speak of Lines: 15 Message-ID: References: <6b5aa241-0498-4e41-993b-a1ed445effb0@googlegroups.com> <02a1a24e-5ead-486c-8397-e68a2a79f8f7@googlegroups.com> <8760pynx50.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="7230"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18xBOU8bSWFSH2MqJvBkakB" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:6mXkzkKnwebe2wbgMOPVlPekpBw= sha1:4/Ycy3HNehntYBYJfqCXqzctJyA= Xref: csiph.com comp.lang.c:93495 supercat@casperkitty.com writes: [...] > As it is, since the _Bool type will seldom generate better code than > "unsigned char", and will sometimes generate worse code, I'm not quite > clear why programmers should use it except to communicate with APIs that > also do so. Programmers should use _Bool or bool because it's substantially clearer than using unsigned char to represent a true/false condition. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"