curl-library
Re: s/bool/int
From: Michael Schuster <michael.schuster_at_oracle.com>
Date: Wed, 26 May 2010 11:16:21 +0200
Date: Wed, 26 May 2010 11:16:21 +0200
On 26.05.10 11:03, Tor Arntsen wrote:
> Maybe the bool/int/typedef issue is the worst one though (as in:
> Easiest to mess up). For that particular case, if you really want to
> keep a bool type, why not make it an 'enum' instead? Because some
> compilers will yell at you if you try to assign any random int to an
> enum. The enum handling is being handled slightly stronger by some
> current-generation compilers (unlike in the past where it was exactly
> as just a define). Just a thought.
I'd second this - I wanted to point this out last night but couldn't get
the SunStudio compiler to burp up a warning ... more study of manuals
needed, I guess.
Michael
-- michael.schuster@oracle.com http://blogs.sun.com/recursion Recursion, n.: see 'Recursion' ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-05-26