diff options
author | Bruno Haible <bruno@clisp.org> | 2020-08-16 18:44:53 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-08-16 18:44:53 +0200 |
commit | f79f0b4f919a3270153a64b19d3189c15c939b5b (patch) | |
tree | bdc0432732f274b845ac81d8666e19a1cf905614 /lib/argp.h | |
parent | bed51ff8cc7bb755b32fa83c589436d8221380c6 (diff) | |
download | gnulib-f79f0b4f919a3270153a64b19d3189c15c939b5b.tar.gz |
Use __restrict also on clang.
* lib/argp.h (__restrict): Don't define as a macro on clang >= 3.
* lib/glob.in.h (_Restrict_): Use __restrict on clang >= 3.
* lib/unitypes.in.h (_UC_RESTRICT): Likewise.
Diffstat (limited to 'lib/argp.h')
-rw-r--r-- | lib/argp.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/argp.h b/lib/argp.h index 808c900b78..c71dd963d8 100644 --- a/lib/argp.h +++ b/lib/argp.h @@ -39,7 +39,8 @@ Other compilers use __restrict, __restrict__, and _Restrict, and 'configure' might #define 'restrict' to those words. */ #ifndef __restrict -# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)) +# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3) # if 199901L <= __STDC_VERSION__ # define __restrict restrict # else |