diff options
| author | Vibhav Pant | 2020-08-21 14:04:35 +0530 |
|---|---|---|
| committer | Vibhav Pant | 2020-08-21 14:04:35 +0530 |
| commit | f0f8d7b82492e741950c363a03b886965c91b1b0 (patch) | |
| tree | 19b716830b1ebabc0d7d75949c4e6800c0f104ad /lib/cdefs.h | |
| parent | 9e64a087c4d167e7ec1c4e22bea3e6af53b563de (diff) | |
| parent | c818c29771d3cb51875643b2f6c894073e429dd2 (diff) | |
| download | emacs-feature/native-comp-macos-fixes.tar.gz emacs-feature/native-comp-macos-fixes.zip | |
Merge branch 'feature/native-comp' into feature/native-comp-macos-fixesfeature/native-comp-macos-fixes
Diffstat (limited to 'lib/cdefs.h')
| -rw-r--r-- | lib/cdefs.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/cdefs.h b/lib/cdefs.h index 4f89f4e4bf0..b1870fd0a93 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h | |||
| @@ -85,7 +85,7 @@ | |||
| 85 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct | 85 | # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct |
| 86 | # define __NTHNL(fct) __attribute__ ((__nothrow__)) fct | 86 | # define __NTHNL(fct) __attribute__ ((__nothrow__)) fct |
| 87 | # else | 87 | # else |
| 88 | # if defined __cplusplus && __GNUC_PREREQ (2,8) | 88 | # if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4) |
| 89 | # define __THROW throw () | 89 | # define __THROW throw () |
| 90 | # define __THROWNL throw () | 90 | # define __THROWNL throw () |
| 91 | # define __NTH(fct) __LEAF_ATTR fct throw () | 91 | # define __NTH(fct) __LEAF_ATTR fct throw () |
| @@ -148,7 +148,7 @@ | |||
| 148 | # define __warnattr(msg) __attribute__((__warning__ (msg))) | 148 | # define __warnattr(msg) __attribute__((__warning__ (msg))) |
| 149 | # define __errordecl(name, msg) \ | 149 | # define __errordecl(name, msg) \ |
| 150 | extern void name (void) __attribute__((__error__ (msg))) | 150 | extern void name (void) __attribute__((__error__ (msg))) |
| 151 | #elif __glibc_clang_has_attribute (__diagnose_if__) | 151 | #elif __glibc_clang_has_attribute (__diagnose_if__) && 0 /* fails on Fedora 31 with Clang 9. */ |
| 152 | # define __warndecl(name, msg) \ | 152 | # define __warndecl(name, msg) \ |
| 153 | extern void name (void) __attribute__((__diagnose_if__ (1, msg, "warning"))) | 153 | extern void name (void) __attribute__((__diagnose_if__ (1, msg, "warning"))) |
| 154 | # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) | 154 | # define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning"))) |
| @@ -194,7 +194,7 @@ | |||
| 194 | Example: | 194 | Example: |
| 195 | int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ | 195 | int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ |
| 196 | 196 | ||
| 197 | #if defined __GNUC__ && __GNUC__ >= 2 | 197 | #if (defined __GNUC__ && __GNUC__ >= 2) || (__clang_major__ >= 4) |
| 198 | 198 | ||
| 199 | # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) | 199 | # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) |
| 200 | # ifdef __cplusplus | 200 | # ifdef __cplusplus |
| @@ -465,7 +465,8 @@ | |||
| 465 | 465 | ||
| 466 | #if (!defined _Static_assert && !defined __cplusplus \ | 466 | #if (!defined _Static_assert && !defined __cplusplus \ |
| 467 | && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ | 467 | && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ |
| 468 | && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__)) | 468 | && (!(__GNUC_PREREQ (4, 6) || __clang_major__ >= 4) \ |
| 469 | || defined __STRICT_ANSI__)) | ||
| 469 | # define _Static_assert(expr, diagnostic) \ | 470 | # define _Static_assert(expr, diagnostic) \ |
| 470 | extern int (*__Static_assert_function (void)) \ | 471 | extern int (*__Static_assert_function (void)) \ |
| 471 | [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] | 472 | [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] |