Ma Lin <malin...@163.com> added the comment:
If use static inline function, and Py_UNREACHABLE() inside an if-else branch that should return a value, compiler may emit warning: https://godbolt.org/z/YtcNSf MSVC v19.14: warning C4715: 'test': not all control paths return a value clang 8.0.0: warning: control may reach end of non-void function [-Wreturn-type] Other compilers (gcc, icc) don't emit this warning. This situation in real code: https://github.com/python/cpython/blob/v3.8.0b4/Include/object.h#L600 https://github.com/python/cpython/blob/v3.8.0b4/Objects/longobject.c#L3088 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38205> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com