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: Tue, 13 Sep 2016 18:08:33 -0700 Organization: None to speak of Lines: 21 Message-ID: References: <6b5aa241-0498-4e41-993b-a1ed445effb0@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="8525"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18X4HpyStK07GMNQJVrZSj/" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:pM8ir1srhSa07yps24HrkdsKAQI= sha1:tPkL7yNLw4lq+HroEVMGJWtKAjg= Xref: csiph.com comp.lang.c:93452 Tim Rentsch writes: > thiago.adams@gmail.com writes: > >> Does anyone knows if an enumeration was considered to implement _Bool? > > It wouldn't make sense to implement _Bool as an enumeration, > because by there aren't any enumeration constants that go > with it. Surely if _Bool were an enumerated type, false and true would be enumeration constants. My favorite way to define a boolean type if I can't assume C99 is typedef enum { false, true } bool; -- 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"