delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/02/03/02:32:44

X-Sybari-Trust: 7626947d 9ffcebbb 908facde 00000138
From: Martin Stromberg <eplmst AT epl DOT ericsson DOT se>
Message-Id: <200302030730.IAA16240@lws256.lu.erisoft.se>
Subject: Re: restrict
To: djgpp-workers AT delorie DOT com
Date: Mon, 3 Feb 2003 08:30:07 +0100 (MET)
In-Reply-To: <3E3C59DB.9F480DF7@phekda.freeserve.co.uk> from "Richard Dawe" at Feb 01, 2003 11:35:55 PM
X-Mailer: ELM [version 2.5 PL3]
MIME-Version: 1.0
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

Richard said:
> ams AT ludd DOT luth DOT se wrote:
> > We have a problem. gcc only recognise "restrict" if "-std=c99" is
> > given on the command line.
> 
> Perhaps we should add that flag to gcc.opt?

Well, we can't unless we want to rule out compiling libc with gcc
2.95.3. (I don't.)

However, meanwhile I've wondering if having a libc compiled with
restrict and using headers without restrict or vice versa can be
problem?

> > So we'll need some macro or some way knowing when c99 is in
> > effect. Alas I can't find one. I've been looking at the verbose output
> > from gcc.
> > 
> > Any ideas?
> 
> C99 standard, section 6.10.8: "Predefined macro names" includes:
> 
>     __STDC_VERSION__ The integer constant 199901L.
> 
> It says in the footnote that the previous version was 199409L.

Thanks! And to CBFalconer too!


Right,

						MartinS

- Raw text -


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