Mail Archives: djgpp-workers/2003/02/01/16:00:35

Message-ID: <>
Date: Sat, 01 Feb 2003 13:22:55 -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: restrict
References: <200302011404 DOT h11E4rb15460 AT speedy DOT ludd DOT luth DOT se>
Reply-To: djgpp-workers AT delorie DOT com

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

  if not c99 then begin
     if defined restrict then set oldrestrict=restrict
     else set oldrestrict undefined
     undefine restrict
     define restrict


  if not c99 then begin
     undefine restrict
     if oldrestrict != undefined then set restrict oldrestrict
     undefine oldrestrict

where oldrestrict and undefined are in the implementation name

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

- Raw text -

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