Skip to content

Commit a31db85

Browse files
committed
Avoid clang's "that's a GNU extension!" warning for #ifdef __GNUC__
1 parent 17da7d8 commit a31db85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_testcapimodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3374,8 +3374,8 @@ _testcapi_exec(PyObject *m)
33743374

33753375
// Test soft-deprecated macros
33763376
Py_ALIGNED(64) char buf[4];
3377-
#ifdef __GNUC__
3378-
Py_BUILD_ASSERT(_Alignof(buf) == 64);
3377+
#if defined(__GNUC__)
3378+
Py_BUILD_ASSERT(__extension__ __alignof__(buf) >= 64);
33793379
#endif
33803380
assert(strcmp(PY_FORMAT_SIZE_T, "z") == 0);
33813381
Py_BUILD_ASSERT(Py_LL(123) == 123LL);

0 commit comments

Comments
 (0)