From f79f0b4f919a3270153a64b19d3189c15c939b5b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 16 Aug 2020 18:44:53 +0200 Subject: 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. --- lib/argp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/argp.h') 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 -- cgit v1.2.1