Re: keyword restrict -> VISUALC

Bob Friesenhahn <[email protected]> Sat, 12 Dec 2020 08:27:57 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <[email protected]>
On Fri, 11 Dec 2020, Pro Turm wrote:

> It seems the following code can be removed:
> nt_base.h
>
> // Visual C++ does not usually seem to support the C'99 restrict keyword
> // Maybe it will be added in some version.
> #if defined(_VISUALC_)  /* && (_MSC_VER <= 1500) */
> #  define restrict /* nothing */
> #endif
>
> magick_config.h
> /* Define to the equivalent of the C99 'restrict' keyword, or to
>   nothing if this is not supported.  Do not define if restrict is
>   supported directly.  */
> #define restrict __restrict

In what version of Visual Studio was this symbol added?  Since it is a 
C compiler feature, does it actually work as described by the C 
language specification?

It has been a continuing problem that Microsoft's stated intention is 
to support C language features only so much as required to support the 
C++ specification, and 'restrict' has been a C language feature which 
was not included in C++ (maybe it is now?).

We have Visual Studio users using older versions of Visual Studio such 
as from 2005 and GraphicsMagick releases have still been using 2008 
since that is the only paid "Professional" version that I have here 
and the output is assured to run on almost any Windows version 
(including versions that Microsoft no longer supports).

Visual Studio 2015 was the first release which supported basic C 
header and language features from C'99 (e.g. stdint.h).

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt