delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/04/24/10:43:45

Date: Mon, 24 Apr 2000 11:34:51 -0400
Message-Id: <200004241534.LAA04254@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <Pine.SUN.3.91.1000424083432.12476B-100000@is> (message from Eli
Zaretskii on Mon, 24 Apr 2000 08:35:30 +0200 (IST))
Subject: Re: EILSEQ in errno.h
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000424083432 DOT 12476B-100000 AT is>
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

> I wonder whether we want some preprocessing symbol around the
> C99-specific stuff, in case someone would use an older compiler
> version.

If we do this, (1) it should be limited to those things that will
break without the new compiler.  Def'ing out a #define like EILSEQ
doesn't seem like a win to me, and (2) should we create a
libc/features.h file that has the complex detection, and #defines
simple macros like __C99_COMPILER or something like that?

I've also seen platforms that define a macro such that you can do this:

#if GCC_VERSION_MINIMUM(2,95,2)
...
#endif

I don't recall the specifics.

> For example, we could use "#if __STDC_VERSION__ >= 199901", or look at
> __GNUC__ and __GNUC_MINOR__ (or both).  See my other mail about a
> specific suggestion.

Make sure your logic will work for GNUC==3 and GNUC_MINOR==0

- Raw text -


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