This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author malin
Recipients gregory.p.smith, malin, sir-sigurd, vstinner, zach.ware
Date 2019-09-19.01:03:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568855021.51.0.324915468566.issue38205@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2019-09-19 01:03:41malinsetrecipients: + malin, gregory.p.smith, vstinner, zach.ware, sir-sigurd
2019-09-19 01:03:41malinsetmessageid: <1568855021.51.0.324915468566.issue38205@roundup.psfhosted.org>
2019-09-19 01:03:41malinlinkissue38205 messages
2019-09-19 01:03:41malincreate