Skip to content

Commit ddea5c0

Browse files
devnexennikic
authored andcommitted
crc32 module, clang spurious warning removal.
Closes GH-6725.
1 parent f06efce commit ddea5c0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ext/standard/crc32.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ static inline int has_crc32_insn() {
5050
# endif
5151
}
5252

53-
# pragma GCC push_options
54-
# pragma GCC target ("+nothing+crc")
53+
# if defined(__GNUC__) && !defined(__clang__)
54+
# pragma GCC push_options
55+
# pragma GCC target ("+nothing+crc")
56+
# endif
5557
static uint32_t crc32_aarch64(uint32_t crc, char *p, size_t nr) {
5658
while (nr >= sizeof(uint64_t)) {
5759
crc = __crc32d(crc, *(uint64_t *)p);
@@ -73,7 +75,9 @@ static uint32_t crc32_aarch64(uint32_t crc, char *p, size_t nr) {
7375
}
7476
return crc;
7577
}
76-
# pragma GCC pop_options
78+
# if defined(__GNUC__) && !defined(__clang__)
79+
# pragma GCC pop_options
80+
# endif
7781
#endif
7882

7983
/* {{{ Calculate the crc32 polynomial of a string */

0 commit comments

Comments
 (0)