X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f Date: Thu, 8 Jan 2004 12:07:22 +0200 (EET) From: Esa A E Peuha Sender: peuha AT sirppi DOT helsinki DOT fi To: djgpp-workers AT delorie DOT com Subject: Re: stdbool.h and complex.h In-Reply-To: <3FFCF1F4.B86AC9DA@yahoo.com> Message-ID: References: <3FFCF1F4 DOT B86AC9DA AT yahoo DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 8 Jan 2004, CBFalconer wrote: > > #ifndef __dj_stdbool__h_ > > #define __dj_stdbool__h_ > > > > #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ > > || !defined(__STRICT_ANSI__) > > > > #define bool _Bool > > #define true 1 > > #define false 0 > > #define __bool_true_false_are_defined 1 > > > > #endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */ > > > > #endif /* !__dj_stdbool__h_ */ > > I question whether it is necessary to have the __STDC_VERSION etc. > guard, or even desirable. Yes, it is both. If the user asks for strict ANSI C89, then our headers must not define anything not in that standard, even if any specific header (like this one) isn't in the standard. Maybe we should add warnings like "#warn using stdbool.h while in strict ANSI C89 mode" (or even #error, since strict ANSI doesn't know about #warn). -- Esa Peuha student of mathematics at the University of Helsinki http://www.helsinki.fi/~peuha/