◐ Shell
clean mode source ↗

[3.14] gh-141732: Fix `ExceptionGroup` repr changing when original exception sequence is mutated (GH-141736) by miss-islington · Pull Request #142388 · python/cpython

Objects/exceptions.c:1954:34: error: too few arguments provided to function-like macro invocation
                        "module.");
                                 ^
Objects/exceptions.c:696:9: note: macro 'ComplexExtendsException' defined here
#define ComplexExtendsException(EXCBASE, EXCNAME, EXCSTORE, EXCNEW, \
        ^
Objects/exceptions.c:1949:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
ComplexExtendsException(PyExc_Exception, ImportError,
^
int
Objects/exceptions.c:1960:1: error: use of undeclared identifier '_PyExc_ImportError'; did you mean 'PyExc_ImportError'?
MiddlingExtendsException(PyExc_ImportError, ModuleNotFoundError, ImportError,
^
Objects/exceptions.c:692:12: note: expanded from macro 'MiddlingExtendsException'
    static MiddlingExtendsExceptionEx( \
           ^
Objects/exceptions.c:686:47: note: expanded from macro 'MiddlingExtendsExceptionEx'
    EXCSTORE ## _clear, 0, 0, 0, 0, 0, 0, 0, &_ ## EXCBASE, \
                                              ^
<scratch space>:21:1: note: expanded from here
_PyExc_ImportError
^
./Include/pyerrors.h:93:24: note: 'PyExc_ImportError' declared here
PyAPI_DATA(PyObject *) PyExc_ImportError;
                       ^
Objects/exceptions.c:1960:1: warning: incompatible pointer types initializing 'PyTypeObject *' (aka 'struct _typeobject *') with an expression of type 'PyObject **' (aka 'struct _object **') [-Wincompatible-pointer-types]
MiddlingExtendsException(PyExc_ImportError, ModuleNotFoundError, ImportError,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Objects/exceptions.c:692:12: note: expanded from macro 'MiddlingExtendsException'
    static MiddlingExtendsExceptionEx( \
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Objects/exceptions.c:686:46: note: expanded from macro 'MiddlingExtendsExceptionEx'
    EXCSTORE ## _clear, 0, 0, 0, 0, 0, 0, 0, &_ ## EXCBASE, \
                                             ^~~~~~~~~~~~~
Objects/exceptions.c:4338:5: error: use of undeclared identifier '_PyExc_ImportError'; did you mean 'PyExc_ImportError'?
    ITEM(ImportError),
    ^
Objects/exceptions.c:4320:22: note: expanded from macro 'ITEM'
#define ITEM(NAME) {&_PyExc_##NAME, #NAME}
                     ^
<scratch space>:62:1: note: expanded from here
_PyExc_ImportError
^
./Include/pyerrors.h:93:24: note: 'PyExc_ImportError' declared here
PyAPI_DATA(PyObject *) PyExc_ImportError;
                       ^
Objects/exceptions.c:4338:5: warning: incompatible pointer types initializing 'PyTypeObject *' (aka 'struct _typeobject *') with an expression of type 'PyObject **' (aka 'struct _object **') [-Wincompatible-pointer-types]
    ITEM(ImportError),
    ^~~~~~~~~~~~~~~~~
Objects/exceptions.c:4320:21: note: expanded from macro 'ITEM'
#define ITEM(NAME) {&_PyExc_##NAME, #NAME}
                    ^~~~~~~~~~~~~~
2 warnings and 4 errors generated.