diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-02-25 10:19:06 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-02-25 10:19:06 +0100 |
commit | 362116c80bc3c0d671a72c48d7312cd8dd6ca9e8 (patch) | |
tree | 42ca684b306b9cff451e7413e4481ed0fd345bb1 | |
parent | 0f6c00200b95231bef00b9dfd94f35db924a3cc6 (diff) | |
parent | ddea5c08167e28e04c92d2fd92e1b52fec5ac01a (diff) | |
download | php-git-362116c80bc3c0d671a72c48d7312cd8dd6ca9e8.tar.gz |
Merge branch 'PHP-8.0'
* PHP-8.0:
crc32 module, clang spurious warning removal.
-rw-r--r-- | ext/standard/crc32.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c index 659c9f0906..cca5917438 100644 --- a/ext/standard/crc32.c +++ b/ext/standard/crc32.c @@ -50,8 +50,10 @@ static inline int has_crc32_insn() { # endif } -# pragma GCC push_options -# pragma GCC target ("+nothing+crc") +# if defined(__GNUC__) && !defined(__clang__) +# pragma GCC push_options +# pragma GCC target ("+nothing+crc") +# endif static uint32_t crc32_aarch64(uint32_t crc, char *p, size_t nr) { while (nr >= sizeof(uint64_t)) { crc = __crc32d(crc, *(uint64_t *)p); @@ -73,7 +75,9 @@ static uint32_t crc32_aarch64(uint32_t crc, char *p, size_t nr) { } return crc; } -# pragma GCC pop_options +# if defined(__GNUC__) && !defined(__clang__) +# pragma GCC pop_options +# endif #endif /* {{{ Calculate the crc32 polynomial of a string */ |