cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: s/bool/int

From: Tor Arntsen <tor_at_spacetec.no>
Date: Wed, 26 May 2010 22:45:01 +0200

On Tue, May 25, 2010 at 23:39, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Tue, 25 May 2010, Kamil Dudka wrote:
>
>> Is it anyhow useful for you to get a warning when assigning a non-bool
>> value to bool variable?
>
> Yes I think so. The variables we declare as 'bool' MUST NEVER be anything
> else than TRUE or FALSE.
[..]

Hm, this mail didn't show up in my mailer until about just now..
Anyway, the bool->enum change (for non-C99 platforms) that I posted
should take care of that aspect quite well (MIPSPro compiler will
detect it). It changed the #defines of TRUE and FALSE from 1/0 to
true/false (which would be either from the enum in the non-C99 case,
or the C99 types otherwise) so it should help for C99 too, if Kamil's
cgcc-tricks work out.

-Tor
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-26