www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2004/01/09/17:23:22

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
Message-ID: <3FFF2187.4000708@phekda.gotadsl.co.uk>
Date: Fri, 09 Jan 2004 21:47:51 +0000
From: Richard Dawe <rich AT phekda DOT gotadsl DOT co DOT uk>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031031
X-Accept-Language: en, de, fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: stdbool.h and complex.h
References: <Pine DOT OSF DOT 4 DOT 58 DOT 0401071356580 DOT 26260 AT sirppi DOT helsinki DOT fi> <3FFCF1F4 DOT B86AC9DA AT yahoo DOT com> <Pine DOT OSF DOT 4 DOT 58 DOT 0401081156010 DOT 23737 AT sirppi DOT helsinki DOT fi>
In-Reply-To: <Pine.OSF.4.58.0401081156010.23737@sirppi.helsinki.fi>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Esa A E Peuha wrote:
> 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__)
[snip]
>>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.

I agree.

 > 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).

Using warnings in C library headers sounds like a bad idea to me; you 
may not be able to build with -Werror.

I also don't think it's our duty to force portability on the programmer.

Bye, Rich =]

-- 
Richard Dawe [ http://homepages.nildram.co.uk/~phekda/richdawe/ ]

"You can't evaluate a man by logic alone."
   -- McCoy, "I, Mudd", Star Trek

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019