I have -Werror=cast-align in my global CFLAGS and see a ton of test failures like this: ----------------------------- Captured stdout call ----------------------------- running build_ext building 'native__mypyc' extension creating build/temp.linux-sparc64-3.8 creating build/temp.linux-sparc64-3.8/build sparc-unknown-linux-gnu-gcc -O2 -mcpu=niagara2 -pipe -Wcast-align -fPIC -I/var/tmp/portage/dev-python/mypy-0.800/work/mypy-0.800/mypyc/lib-rt -Ibuild -I/usr/include/python3.8 -c build/__native_native.c -o build/temp.linux-sparc64-3.8/build/__native_native.o -O0 -Werror -Wno-unused-function -Wno-unused-label -Wno-unreachable-code -Wno-unused-variable -Wno-unused-command-line-argument -Wno-unknown-warning-option -Wno-unused-but-set-variable ----------------------------- Captured stderr call ----------------------------- In file included from /usr/include/python3.8/abstract.h:837, from /usr/include/python3.8/Python.h:147, from /var/tmp/portage/dev-python/mypy-0.800/work/mypy-0.800/mypyc/lib-rt/init.c:1, from build/__native_native.c:1: /usr/include/python3.8/cpython/abstract.h: In function '_PyVectorcall_Function': /usr/include/python3.8/cpython/abstract.h:91:11: error: cast increases required alignment of target type [-Werror=cast-align] 91 | ptr = (vectorcallfunc*)(((char *)callable) + offset); | ^ In file included from /var/tmp/portage/dev-python/mypy-0.800/work/mypy-0.800/mypyc/lib-rt/CPy.h:12, from /var/tmp/portage/dev-python/mypy-0.800/work/mypy-0.800/mypyc/lib-rt/init.c:2, from build/__native_native.c:1: /var/tmp/portage/dev-python/mypy-0.800/work/mypy-0.800/mypyc/lib-rt/pythonsupport.h: In function '_CPyDictView_New': /var/tmp/portage/dev-python/mypy-0.800/work/mypy-0.800/mypyc/lib-rt/pythonsupport.h:383:19: error: cast increases required alignment of target type [-Werror=cast-align] 383 | dv->dv_dict = (PyDictObject *)dict; | ^ In file included from /usr/include/python3.8/dictobject.h:87, from /usr/include/python3.8/Python.h:107, from /var/tmp/portage/dev-python/mypy-0.800/work/mypy-0.800/mypyc/lib-rt/init.c:1, from build/__native_native.c:1: /var/tmp/portage/dev-python/mypy-0.800/work/mypy-0.800/mypyc/lib-rt/getargs.c: In function 'vgetargskeywords': /usr/include/python3.8/cpython/dictobject.h:53:57: error: cast increases required alignment of target type [-Werror=cast-align] 53 | #define PyDict_GET_SIZE(mp) (assert(PyDict_Check(mp)),((PyDictObject *)mp)->ma_used) | ^ /var/tmp/portage/dev-python/mypy-0.800/work/mypy-0.800/mypyc/lib-rt/getargs.c:1257:38: note: in expansion of macro 'PyDict_GET_SIZE' 1257 | nkwargs = (kwargs == NULL) ? 0 : PyDict_GET_SIZE(kwargs); | ^~~~~~~~~~~~~~~ In file included from /usr/include/python3.8/Python.h:101, from /var/tmp/portage/dev-python/mypy-0.800/work/mypy-0.800/mypyc/lib-rt/init.c:1, from build/__native_native.c:1: /var/tmp/portage/dev-python/mypy-0.800/work/mypy-0.800/mypyc/lib-rt/int_ops.c: In function 'CPyLong_FromFloat': /usr/include/python3.8/floatobject.h:51:33: error: cast increases required alignment of target type [-Werror=cast-align] 51 | #define PyFloat_AS_DOUBLE(op) (((PyFloatObject *)(op))->ob_fval) | ^ /var/tmp/portage/dev-python/mypy-0.800/work/mypy-0.800/mypyc/lib-rt/int_ops.c:269:34: note: in expansion of macro 'PyFloat_AS_DOUBLE' 269 | return PyLong_FromDouble(PyFloat_AS_DOUBLE(o)); | ^~~~~~~~~~~~~~~~~ build/__native_native.c: In function '__sparc_get_pc_thunk.l7': cc1: error: unrecognized command line option '-Wno-unknown-warning-option' [-Werror] cc1: error: unrecognized command line option '-Wno-unused-command-line-argument' [-Werror] cc1: all warnings being treated as errors Reproducible: Always
We've eventually decided to disable mypyc, and mypy is pure Python now.