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

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
Message-ID: <3FFF586F.611F9247@yahoo.com>
Date: Fri, 09 Jan 2004 20:42:07 -0500
From: CBFalconer <cbfalconer AT yahoo DOT com>
Organization: Ched Research
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
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> <3FFDEB2F DOT F9560613 AT yahoo DOT com> <9003-Fri09Jan2004105245+0200-eliz AT elta DOT co DOT il> <3FFE97BE DOT 4CA94BA3 AT yahoo DOT com> <3FFF2420 DOT 7090305 AT phekda DOT gotadsl DOT co DOT uk>
Reply-To: djgpp-workers AT delorie DOT com

Richard Dawe wrote:
> CBFalconer wrote:
> [snip]
> > Injecting _Bool is no problem, using it (under C90) is.  So the
> > only problem that can arise is not having the underlying C99
> > abilities.  Therefore the proposed stdbool.h is fine, with the
> > solitary exception of the "|| STRICT_ANSI" term.
> 
> I'm having trouble understanding your point(s).
> 
> * C89 doesn't define _Bool.
> * Does C90 define _Bool? What is C90?
> * C99 does define _Bool.
> 
> The C99 sections are protected by:
> 
>      (Standard C version defines >= C99) && !(strict ANSI)
> 
> If we're using -ansi/-std=c89/-std=gnu89, __STRICT_ANSI__ will be
> defined but the C version defines won't. So the C99 section will *not*
> be included.
> 
> If we're using -std=c99/-std=gnu99, then __STRICT_ANSI__ and the C
> version defines are defined. So the C99 section will be included.
> 
> If no -ansi/-std switches are used, then __STRICT_ANSI__ is not defined
> and the C99 section will be included. Note that this is independent of
> whatever mode the compiler operates in by default.
> 
> So I don't see what the problem is.

Maybe I've got my head up. This was the line that gave me the
impression that !defined(__STRICT_ANSI__) would let things in.  It
uses ||.

>>>#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
>>>  || !defined(__STRICT_ANSI__)

-- 
Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net)
   Available for consulting/temporary embedded and systems.
   <http://cbfalconer.home.att.net>  USE worldnet address!



- Raw text -


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