delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/04/03/07:31:40

Date: Mon, 3 Apr 2000 13:09:34 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Martin Stromberg <Martin DOT Stromberg AT lu DOT erisoft DOT se>
cc: djgpp-workers AT delorie DOT com
Subject: Re: restrict
In-Reply-To: <200004030951.LAA02851@lws256.lu.erisoft.se>
Message-ID: <Pine.SUN.3.91.1000403130522.27255B-100000@is>
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

On Mon, 3 Apr 2000, Martin Stromberg wrote:

> > Does the standard actually *require* the prototypes to
> > include `restrict'?
> 
> That's my interpretation.

Yes, but is there anything in the standard, besides the prototypes it 
shows, that can back up this interpretation?

> Besides, why would they put the word there
> if it wasn't required?

The prototype in the standard is meant to document the function.  As 
such, it is perfectly possible to have `restrict' there, because it
explains that the function should behave in a manner compatible with that 
declaration.

But whether the header files supplied with the library must actually use 
`restrict' might be a different matter.

Compare this with `const': if string.h says this:

	size_t strlen (char *);

is it in violation of the standard?  I wonder.

- Raw text -


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