[Issue 22880] importC: __restrict restrict __restrict__

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 19 06:20:10 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=22880

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ImportC
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla at digitalmars.com
         Resolution|---                         |INVALID

--- Comment #3 from Walter Bright <bugzilla at digitalmars.com> ---
The idea is to

  #include <importc.h>

when preprocessing. This file,

  https://github.com/dlang/druntime/blob/master/src/importc.h

defines a bunch of macros to deal with extensions used by various compilers.
gcc's system #includes only use `__restrict` as far as I can tell, and there's
a macro for it:

https://github.com/dlang/druntime/blob/master/src/importc.h#L21

__restrict__ isn't there. If you find __restrict__ being used in system
#includes, please let us know. In the meantime, you can just:

    #define __restrict__ __restrict

or something like that to get things moving for you.

--


More information about the Digitalmars-d-bugs mailing list