Skip to content

Commit 6fd403c

Browse files
committed
fix pragma not available on clang
1 parent 7725dc9 commit 6fd403c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/cysignals/tests.pyx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ cdef extern from "<pthread.h>" nogil:
5858

5959

6060
cdef extern from *:
61-
# disable warning (variable might be clobbered by longjmp)
62-
'#pragma GCC diagnostic ignored "-Wclobbered"'
61+
"""
62+
#if defined(__GNUC__) && !defined(__clang__)
63+
// disable warning (variable might be clobbered by longjmp)
64+
#pragma GCC diagnostic ignored "-Wclobbered"
65+
#endif
66+
"""
6367
ctypedef int volatile_int "volatile int"
6468

6569

0 commit comments

Comments
 (0)