Mail Archives: djgpp-workers/2003/02/01/16:46:06

From: <ams AT ludd DOT luth DOT se>
Message-Id: <>
Subject: Re: restrict
In-Reply-To: <> "from CBFalconer at Feb 1, 2003 01:22:55
To: djgpp-workers AT delorie DOT com
Date: Sat, 1 Feb 2003 22:45:56 +0100 (CET)
X-Mailer: ELM [version 2.4ME+ PL78 (25)]
MIME-Version: 1.0
X-MailScanner: Found to be clean
X-MailScanner-SpamScore: s
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

According to CBFalconer:
> 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.
> > 
> > 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.
> Can't the system headers do something like (reworked into #ifs
> etc)
>   if not c99 then begin
>      if defined restrict then set oldrestrict=restrict
>      else set oldrestrict undefined
>      undefine restrict
>      define restrict
>   endif
>   ....
>   if not c99 then begin
>      undefine restrict
>      if oldrestrict != undefined then set restrict oldrestrict
>      undefine oldrestrict
>   endif
> where oldrestrict and undefined are in the implementation name
> space.

I don't understand what you mean. (Perhaps you don't understand what I

Tell us the macro (or something) to use to detect that "-std=c99" was



- Raw text -

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